glsl: Rework oversize array check for gl_TexCoord.
authorPaul Berry <stereotype441@gmail.com>
Tue, 6 Sep 2011 17:01:51 +0000 (10:01 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 8 Sep 2011 16:37:24 +0000 (09:37 -0700)
commit93b9758d01e2542ec3c2b8672cca0ae19b257aac
treeee7ee3db4f32f602c1b9a199655eb6e44c53b8e6
parent36c4b1a3da44a80624eab9da6543540b4b253f1d
glsl: Rework oversize array check for gl_TexCoord.

The check now applies both when explicitly declaring the size of
gl_TexCoord and when implicitly setting the size of gl_TexCoord by
accessing it using integral constant expressions.

This is prep work for adding similar size checks to gl_ClipDistance.

Fixes piglit tests texcoord/implicit-access-max.{frag,vert}.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ast_to_hir.cpp