linker: Fix consumer_inputs_with_locations indexing
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 5 May 2014 17:39:26 +0000 (10:39 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 7 May 2014 16:50:14 +0000 (09:50 -0700)
commitf7bf37cb13ff4e727d640a3bd02980aba0c0b4ce
treeda8624a8f6d42280374af49c96ba23a6c8929feb
parent98934f4abafc38a19c1b5bd5d48a4f920599b2b0
linker: Fix consumer_inputs_with_locations indexing

In an earlier incarnation of populate_consumer_input_sets and
get_matching_input, the consumer_inputs_with_locations array was indexed
using the user-specified location.  In that version, only user-defined
varyings were included in the array.

In the current incarnation, the Mesa location is used to index the
array, and built-in varyings are included.

This change fixes the unit test to exepect gl_ClipDistance in the array,
and it resizes the arrays to actually be big enough.  It's just dumb
luck that the existing piglit tests use small enough locations to not
stomp the stack. :(

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78258
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Cc: Vinson Lee <vlee@freedesktop.org>
src/glsl/link_varyings.cpp
src/glsl/tests/varyings_test.cpp