gs: Verify consistency checking of geometry shader input layouts.

These tests verify that the implementation properly detects mismatches
between geometry shader input layout declarations, whether they occur
within the same compilation unit or within multiple compilation units.

Mismatches that occur within the same compilation unit should produce
a compile error.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify intra-shader checking of input layout vs. explicitly sized arrays.

These tests verify that the implementation properly detects mismatches
between a geometry shader input layout declaration and an explicitly
sized geometry shader input array appearing in the same shader (the
size of each input array must match the number of vertices per
primitive implied by the input layout declaration).

v2: Call .length() from inside an array declaration to verify that the
compiler properly treats it as a constant expression.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify inter-shader checking of input layout vs. explicitly sized arrays.

These tests verify that the implementation properly detects mismatches
between a geometry shader input layout declaration and an explicitly
sized geometry shader input array appearing in a different shader (the
size of each input array must match the number of vertices per
primitive implied by the input layout declaration).

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify intra-shader checking of input layout vs. implicitly sized arrays.

These tests verify the following interactions between geometry shader
input layout declarations and implicitly sized geometry shader input
arrays:

- If an input array declaration does not specify a size, and it
  follows an input layout declaration, it is sized according to the
  input layout.

- If an input layout declaration follows an input array declaration
  that didn't specify a size, the input array declaration is given a
  size at the time the input layout declaration appears.  An error
  should be reported if the new size conflicts with previous uses of
  the array.

v2: Call .length() from inside an array declaration to verify that the
compiler properly treats it as a constant expression.  Remove
gs-input-sizing-implied-length.shader_test, since it is redundant with
gs-input-sizing-implied-length.geom.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify inter-shader checking of input layout vs. implicitly sized arrays.

These tests verify that unsized geometry shader input arrays in one
compilation unit are properly sized according to a geometry shader
input layout declaration in another compilation unit, and that a link
error occurs if such sizing would conflict with a static usage of the
array.

v2: Remove gs-input-sizing-length-after-layout.shader_test, since it
is redundant with gs-input-sizing-length-after-layout.geom.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify consistency checking of explicitly sized input arrays.

These tests verify that the implementation properly detects mismatches
between sized geometry shader input arrays appearing within the same
compilation unit.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify checking of sized vs. unsized geometry shader input arrays.

These tests verify that if a single geometry shader compilation unit
contains a declaration of both an unsized and a sized input array, the
presence of the sized input array doesn't cause the unsized array to
acquire a size.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Verify that an error is generated if no input layout is specified.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
gs: Test that geometry shader inputs must be arrays.

v2: Additional tests.
gs: Test that geometry shader input declaration rules don't apply to outputs.
gs: Test EndPrimitive() functionality.
Add PIGLIT_STRIP_ARG() macro for extracting args during piglit config.

v2: Fix update of *argc.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Use PIGLIT_STRIP_ARG() in formats.c

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Support both core and compat contexts in xfb/overflow-edge-cases.c.

This will allow the test to be adapted for geometry shaders.

v2: Use VAO's if GL version >= 3.0.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
gs: Adapt xfb/overflow-edge-cases.c for geometry shaders.

The transform feedback test "overflow-edge-cases" can now be invoked
with a "use_gs" argument, that causes it to use a geometry shader.
Support both core and compat contexts in xfb/intervening-read.c.

This will allow the test to be adapted for geometry shaders.

v2: Use VAO's if GL version >= 3.0.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
gs: Adapt xfb/intervening-read.c for geometry shaders.

The transform feedback test "intervening-read" can now be invoked with
a "use_gs" argument, that causes it to use a geometry shader.

v2: In the geometry shader, make positions array const, and fix outer
loop bound.
gs: Make texelFetch and textureSize tests use GLSL 1.50 for geometry shaders.

Previously, these tests used ARB_geometry_shader4.  However, the
initial implementation of geometry shaders in Mesa isn't going to
support ARB_geometry_shader4.  So test this functionality using GLSL
1.50 geometry shaders instead.

v2: Use a generic vertex attribute instead of gl_PositionIn.
Basic test that transform feedback works with geometry shaders.
!UPSTREAM: Test core GS inputs on GLSL 1.50

TODO:
- Make this work.