Add tests for ARB_transform_feedback3

v2: define MAX_VARYINGS, MAX_BUFFERS and MAX_ELEMENTS

Reviewed-by: Brian Paul <brianp@vmware.com>
Add a test for ARB_transform_feedback_instanced

Reviewed-by: Brian Paul <brianp@vmware.com>
copyteximage: test 3D, 1D_ARRAY, 2D_ARRAY and RECT textures and check all layers

it now tests all texture targets and thoroughly checks all texture layers,
faces and slices by rendering a different color into each one of them.
fs-textureGrad-miplevels: A test for textureGrad based on fs-textureLod-miplevels.

Verified on NVIDIA.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
util: Make piglit_probe_rect_halves_equal_rgba() GLES-compatible

In GLES, glReadPixels does not accept format=GL_FLOAT, but it does accept
format=GL_BYTE.

This shouldn't make any tests begin failing. If anything, this commit may
make pass some almost-passing tests because there is less precision in
probing with glReadPixels(GL_BYTE) than glReadPixels(GL_FLOAT).

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util: Define piglit_probe_rect_halves_equal_rgba() for all GL API's

Move the function from piglit-util-gl.c to piglit-util-gl-common.c so that
all GL API's can use it.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util: Add piglit_source_dir()

This function reads the environment variable PIGLIT_SOURCE_DIR, and
reports failure if the function is undefined. The intention is that tests
should use to construct the path to any needed data files.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
framework: Set env var PIGLIT_SOURCE_DIR if unset

Otherwise, if the user forgets to set PIGLIT_SOURCE_DIR himself, then
tests that use piglit_source_dir() will fail.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util: Add piglit_join_paths()

This is a variable argument function that joins together paths with the
system path separator (Unix='/', Windows='\\').

v2: Prevent a buffer overflow found by Jose.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
glut_waffle: Fix glutMainLoop

Stop calling waffle_swap_buffers() from glutMainLoop. It breaks tests in
non-auto mode. It's the test's responsibility to call swapBuffers, anyway.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util: Add utilities for KTX file format

The KTX (Khronos texture) file format specifies a simple format for
storing texture miptrees. This patch adds utility functions for reading
and inspecting KTX files, iterating over the contained images, and easily
loading the miptree with glTexImage().

A future test (oes_compressed_etc1_rgb8_test-miptree) will use this to
load an ETC1 miptree and a reference RGB miptree.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
etc1: Test texturing from an ETC1 miptree

Add test spec/OES_compressed_ETC1_RGB8_texture/miptree.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
etc1: Remove texturing test from 'basic' test file

Now that oes_compressed_etc1_rgb8_texture-miptree, a test for realworld
ETC1 data, has been added to Piglit, the minimal, artificial texturing test
in oes_compressed_etc1_rgb8_texture-basic is unneeded. This patch removes
the texturing test from that file, and only api tests remain.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Changed test name generation so that regardless of OS path seperator, the test name will always use '/'.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Changed piglit-run.py to automatically correct previous test results on a platform where the os seperator is not '\'.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Changed all tests profile to automatically exclude glx on windows.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Modified tests to allow the test profiles to properly work on platforms where execfile() calls in python do not automatically declare variables as globals.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
msaa/formats: Use a wider color range in MSAA float tests.

Previously, the MSAA tests for floating-point color buffers only
exercised color values in the range [0, 1].  This patch extends the
range to [-10, 10], in order to verify that floating-point color
values are not inadvertently clamped.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
msaa/formats: Test signed normalized formats.

The GL spec mandates that signed normalized color formats be clamped
to [0, 1] when in GL_FIXED_ONLY mode, despite the fact that they can
represent values in the range [-1, 1].  So, when testing these
formats, we use a color clamping mode of GL_FALSE.
msaa: Add the ability to run msaa tests without color/depth/stencil buffers.

This patch modifies the common code for MSAA tests, so that we can
easily configure framebuffers that lack a color, depth, and/or stencil
buffer.