glsl: Modify array_sizing_visitor to handle unnamed interface blocks.
authorPaul Berry <stereotype441@gmail.com>
Wed, 25 Sep 2013 21:07:37 +0000 (14:07 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 9 Oct 2013 23:49:48 +0000 (16:49 -0700)
commit15e05b999b779dc48a8e768184b9c69e859c203b
treec671c33943fe7fc9f06e3873ac811fad05b9a64b
parent45e46b2e371e59f11f19b9169aa79ce2b1dffd6f
glsl: Modify array_sizing_visitor to handle unnamed interface blocks.

We were already setting the array size of unsized arrays that appeared
inside unnamed interface blocks, but we weren't updating
ir_variable::interface_type to reflect the new array size, causing
bogus link errors.

This patch causes array_sizing_visitor to keep track of all the
unnamed interface types it sees, and the ir_variables corresponding to
each one.  After the visitor runs, a new function,
fixup_unnamed_interface_types(), adjusts each unnamed interface type
to correctly correspond with the array sizes in the ir_variables.

Fixes piglit tests:
- spec/glsl-1.50/execution/unsized-in-unnamed-interface-block-gs
- spec/glsl-1.50/execution/unsized-in-unnamed-interface-block-multiple

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glsl/ir.h
src/glsl/linker.cpp