Add glGetActiveAttrib test for arrays.

Test the size returned from glGetActiveAttrib is correct
for arrays of various sizes.

Version 2: restructured code and syntax fixes.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
GL-3.2 ARB_texture_multisample: TexImage3DMultisample Test

Version 2: Fixed compile errors.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
GL-3.2 ARB_texture_multisample: TexImage2DMultisample Test

Version 2: Fixed compile errors.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Test bad interaction with optimizer and "array" accesses to vector elements

v2: Add several other, similar test cases that tickle other related bugs
in the same optimization passes.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Chris Wolfe <cwolfe@chromium.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53256
Verify that vertex shader attributes are assigned in order starting w/0

THIS IS NOT REQUIRED BY ANY VERSION OF THE OpenGL SPECIFICATION!

However, almost every OpenGL implementation happens to behave this way
when there is a single vertex shader compilation unit linked into the
program.  As a result, some programs accidentally rely on this behavior.
If the application was never tested on a implementation that behaves any
other way, there's a reasonable chance it has bugs without its
developers even knowing.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl: Test that anonymous structure declarators are not allowed

Both GLSL ES 1.00 and GLSL 1.20 disallow "anonymous structures."  Each
spec explains this term, and it's not what I had previously thought.  It
is valid to have a struct that has no name (e.g., struct { int x }
foo;).  It is not valid to have a struct in a declarator without a
variable name.  Some flavors of C allow this inside structures.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Tom Gall <tom.gall@linaro.org>
glsl: Validate structure-in-structure usage

Both GLSL ES 1.00 and GLSL 1.20 disallow structure declarations inside
other structure declarations.  However, both allow (previously declared)
structures inside other structures.

Mesa currently passes the GLSL ES 1.00 test, but it fails the GLSL 1.20
test.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Tom Gall <tom.gall@linaro.org>
glean/pointsprite: Don't abort when there are no non-black pixels

Instead, just fail the test.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64262
Tested-by: Lu Hua <huax.lu@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Add PIGLIT_FORCE_WINDOW environment variable.

Setting PIGLIT_FORCE_WINDOW=1 causes all piglit windowsystem tests
(those that weren't invoked with the "-fbo" flag) to show the window
prior to calling piglit_display().  Setting PIGLIT_FORCE_WINDOW=0 (the
default) preserves piglit's existing behaviour, which is to only show
the window when the test is run in "manual" mode (with no "-auto"
argument supplied).

Setting PIGLIT_FORCE_WINDOW=1 slows down the piglit run, and produces
more annoying windows on the screen, but it has been observed to
produce more repeatable results when testing with the nVidia
proprietary driver for Linux.
shader_runner: Fix error reporting when vertex data included.

Previously, if a link error occurred in a test that included a
"[vertex data]" section, we would go ahead and try to set up the
vertex input data anyhow, resulting in confusing GL errors.  Now we
only try to set up the vertex input data if linking succeeds.
shader_runner: Add missing newlines to error messages.

Certain shader error messages were missing newlines, leading to the
error message being concatenated on the same line with "PIGLIT:
{'result': 'fail' }".
Add PIGLIT_STRIP_ARG() macro for extracting args during piglit config.
Use PIGLIT_STRIP_ARG() in formats.c
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.
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.
For patch 1
For patch 4
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.