Add a new test for GL_ARB_uniform_buffer_object's std140 layout example.

v2: Require the extension, use one of the uniforms to make sure the
    block is actually active, drop the usage of the old piglit_*
    shader function wrappers, and print informative information about
    the results [anholt].
all.tests: Simplify setup of FBO formats tests.

All of these spec groups had the same set of FBO formats tests.
Add a new test for getting GL_RENDERBUFFER_INTERNAL_FORMAT.

This was in response to an apparent failure in webgl conformance
tests, but it didn't catch the problem I expected.
all.tests: Do a global add_shader_test_dir for generated_tests/spec/

We don't have extensions under there, so no per-directory name
mangling is required.  Now people doing new tests (like my 1.40 stuff)
don't need to remember to add the directory.
all.tests: Do a global import_glsl_parser_tests for generated_tests/spec/

We don't have extensions under there, so no per-directory name
mangling is required.  Now people doing new tests (like my 1.40 stuff)
don't need to remember to add the directory.
generated_tests: Add support for GLSL 1.40 tests using VBOs.
generated_tests: Add testing for GLSL 1.40 inverse().
copyteximage: fix the test for legal texture formats

The code for checking if the texture format is legal was missing some
cases (such as GL_RGB16F).  We also need to check if the format is
legal for the texture target.  Compressed textures can't be used with
GL_TEXTURE_1D for example.

Refactor the format checking code to make it easier to read and expand
in the future.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49124

Reviewed by: Anuj Phogat <anuj.phogat@gmail.com>
cmake: Fix piglit build when BUILD_GLX_TESTS=True

Commit ebf571b7959ab7b15b4588474a8613e110fab5a5 causes the piglitglxutil
library to be after the glut library on the link command line, which causes
the glutInit function to not be found.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
primitive-restart: test glArrayElement

This change expands the function previously named
test_draw_elements to support testing primitive restart with
the glArrayElement function.

All the tests previously run in test_draw_elements
are now repeated using glArrayElement.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Test rendering to various miplevels of depth and stencil textures.

This patch adds a new test, "depthstencil-render-miplevels", which
verifies that we can render to all miplevels of depth and stencil
textures.  It exposes two bugs in Mesa's current i965 driver:

- Miptree offsets aren't being calculated correctly for HiZ and
  separate stencil buffers, causing miplevels to overlap in those
  buffers.

- When binding the same texture to the GL_DEPTH_ATTACHMENT and
  GL_STENCIL_ATTACHMENT points, Mesa is trying to share internal data
  structures even if the miplevels don't match; as a result,
  transitioning from one miplevel to another doesn't work.

The test is capable of running at any texture size (including
non-power-of-two texture sizes).  However, because of some GPU hang
bugs in Mesa's current i965 driver, I've limited it to test at a
texture size of 1024x1024 for now.

v2: Added comment "/* Anonymous namespace */" on the final closing
brace.  Adjusted the naming scheme for the subtests to allow
additional format combinations to be added in the future.  Also added
format combinations involving z32f and z32f_s8.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Add upsample tests