Test that struct names may not begin with "gl_" prefix.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test illegal usages of "gl_" prefix in interface blocks.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that redeclaration of gl_PerVertex must be for a subset.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that interface blocks cannot declare conflicting names.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that in general, interface blocks cannot be redeclared.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that the built-in gl_PerVertex interface block can be redeclared.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

v2: Add comments to clarify that these tests don't use the erroneous
"vec4 t" declaration, since they are verifying functionality when
gl_PerVertex is correctly redeclared.
Test that gl_PerVertex can't be redeclared after it's been used.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that gl_PerVertex can't be redeclared multiple times in one shader.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that after redeclaration, absent members of gl_PerVertex can't be used.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that builtins can't be redeclared both inside and outside gl_PerVertex.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test inter- and intra-stage gl_PerVertex matching rules.

These tests verify the following linkage rules, from GLSL 4.10:

1. If multiple shaders using members of a built-in block belonging to
the same interface are linked together in the same program, they must
all redeclare the built-in block in the same way, as described in
section 4.3.7 "Interface Blocks" for interface block matching, or a
link error will result.

2. It will also be a link error if some shaders in a program redeclare
a specific built-in interface block while another shader in that
program does not redeclare that interface block yet still uses a
member of that interface block.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Verify array-ness and instance name of gl_PerVertex redeclarations.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Verify that gl_PerVertex can't be redeclared in certain shader types.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Test that gl_in may be redeclared with an array size.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
gs: Don't try to use gl_PerVertex when redeclaring fragment shader inputs.

In commit 5b1dff3 (Geometry shaders: Test gl_ClipDistance input (GLSL
1.50)) I accidentally used this syntax to redeclare the
gl_ClipDistance fragment shader input:

    in gl_PerVertex {
      float gl_ClipDistance[8];
    };

This is incorrect--gl_PerVertex is only meaningful in vertex and
geometry shaders.  In fragment shaders gl_ClipDistance isn't in any
interface block.

v2: don't forget the "in" keyword.
Test that in/out qualifiers are required when redeclaring gl_ClipDistance.

Although it is not explicitly stated in the GLSL spec, all examples of
redeclaring built-in in/out variables (such as gl_ClipDistance)
include the "in" or "out" qualifier, so it seems like failure to do so
should cause a compile error.

At present:

- Mesa (as of commit a50c5f8) does not generate an error.

- The NVIDIA proprietary driver for Linux (version 313.18) does not
  generate an error; however, if gl_ClipDistance is redeclared in the
  fragment shader without specifying the "in" keyword, it fails to
  work properly.
Test unsized arrays in interface blocks

These tests verify that unsized arrays appearing inside interface
blocks obey the same rules as unsized arrays appearing outside
interface blocks.  Namely, their size is inferred from the largest
constant integer index used to access them across all compilation
units for the same shader stage, and this inferred size is used to
validate that interface blocks are properly matched between one shader
stage and the next.