glsl: Make gl_ClipDistance[] implicitly sized.
authorPaul Berry <stereotype441@gmail.com>
Thu, 11 Aug 2011 22:03:19 +0000 (15:03 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 8 Sep 2011 16:36:13 +0000 (09:36 -0700)
commitaf243b55ac346f39acda1ad20d90e7c8cc1a33c7
tree1b5acf146ad8960ac2138058aae95238222217a2
parent2864f723d111810532fab7697ad7badf161f45ab
glsl: Make gl_ClipDistance[] implicitly sized.

From the GLSL 1.30 spec, section 7.1 (Vertex Shader Special Variables):

  The gl_ClipDistance array is predeclared as unsized and must be
  sized by the shader either redeclaring it with a size or indexing it
  only with integral constant expressions.

Fixes piglit tests clip-distance-implicit-length.vert,
clip-distance-implicit-nonconst-access.vert, and
{vs,fs}-clip-distance-explicitly-sized.shader_test.

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