Grrr. Not sure how I missed it but this patch breaks transform feedback.
It doesn't seem like a good idea to share this code between the two
codepaths any more, seems like Paul had plains to use it in more places
when it was added but it never happened.
I'll send a version 2 of this patch tomorrow
Updated to parse arrays of arrays and return the correct offset.
We are now also validating the array subscript rather than potentially
returning an offset that will be out of bounds.
---
src/glsl/link_uniforms.cpp | 2 +-
src/glsl/link_varyings.cpp | 7 +--
src/glsl/link_varyings.h