Remove gtf.tests.

It was breaking my test systems, apparently because of the refactor to
not import * in the caller of this file.  At this point I think
everyone's got es3conform building, which includes es2conform, so no
point in still supporting the old one.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
texelFetch: test various texture dimensions

This is the ultimate test for validating texture allocation in the driver.
texelFetch is a perfect test for it: it supports various texture targets,
NPOT textures, and mipmapping. It's also our only test for NPOT 3D mipmapped
textures. This commit adds support for testing various texture dimensions.

There are several ways to specify the range of dimensions to test, for example:

texelFetch fs sampler3D 1x129x9-98x129x9
  This runs the test with the texture width of 1, 2, 3, ... up to 98.

texelFetch fs sampler3D 1x1x1-30x30x30
  This tests all WxHxD combinations, where W,H,D is in {1,..,30}.
  This one takes a really long time, so it's not practical for all.tests, but
  the option is there. The main difference between this and tex3d-npot is that
  this also tests mipmaps and you have the option to test bigger dimensions.

The options for the last parameter are:
  WxH - test just WxHx1 (can be non-auto)
  WxHxD - test just WxHxD (can be non-auto)
  W1-W2 - start with W1x1x1 and end with W2x1x1
  W1xH1-W2xH2 - test all combinations between and including the specified
                values, and D=1
  W1xH1xD1-W2xH2xD2 - test all combinations between and including
                      the specified values

The new items in all.tests only iterate over one dimension, the other
dimensions are fixed. It should cover most cases.

Other changes:

- the space between drawn quads is changed to 1 and the mipmaps are positioned
  next to each other for more stuff to fit on the window

- the test fails if a texture with all its layers and mipmaps doesn't fit
  on the window

- v2: all memory leaks are fixed

Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Merge quick-driver.tests to quick.tests

The difference between the two is 5 tests, which is pretty much nothing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Optionally capture dmesg changes for each test and report them in a summary

The Radeon driver writes GPU page faults to dmesg and we need to know which
tests caused them.

If there is any change in dmesg during a test run, the test result is changed
as follows:
* pass -> dmesg-warn
* warn -> dmesg-warn
* fail -> dmesg-fail
Dmesg is captured before and after each test and the difference between the two
is stored in the test summary.

The piglit-run.py parameter which enables this behavior is --dmesg. It's also
recommended to use -c0.

v2: - address some of Dylan's remarks, mainly bug fixes
    - fix get_dmesg_diff

Reviewed-by: Dylan Baken <baker.dylan.c@gmail.com>
piglit-run: add -1 as an alternative to --no-concurrent

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Fix out of bounds read in the AMD_performance_monitor measure test.

If the last counter returned is a 32-bit value, reading a uint64_t might
go past the end of the buffer.  So, delay reading the 64-bit value until
we know the type is 64-bit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
gl-3.2: Formatting fixes to glDrawBuffers error test

Fix some whitespace issues, use const on the static arrays, use
ARRAY_SIZE instead of hard-coded value, don't clear the window (for no
reason), and execute the test from piglit_init (since there is no
rendering).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Nicholas Mack <nichmack@gmail.com>
Cc: Paul Berry <stereotype441@gmail.com>
gl-3.1: Move draw-buffers-errors test from 3.2 to 3.1

The exact same spec language appears in the 3.1 spec.  Currently no Mesa
driver supports OpenGL 3.2, but there are drivers that support 3.1.
This allows the test to run now on those drivers.

NOTE: This test currently fails in Mesa.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Nicholas Mack <nichmack@gmail.com>
Cc: Paul Berry <stereotype441@gmail.com>
framework: Disable mesa's GL API error logging by default.

Otherwise you'd approximately never terminate a run with khronos's
testsuite included in the run.  If you were lucky.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
GL_ARB_vertex_program: Add a tests for Mesa code I was changing.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl-1.50: Test compilation of interface blocks containing unsized arrays.

Although it's not explicitly stated in the GLSL 1.50 spec, unsized
arrays are allowed in interface blocks.

section 1.2.3 (Changes from revision 5 of version 1.5) of the GLSL
1.50 spec says:

    * Completed full update to grammar section.  Tested spec examples
      against it:

      ...

      * add unsized arrays for block members

And section 7.1 (Vertex and Geometry Shader Special Variables)
includes an unsized array in the built-in gl_PerVertex interface
block:

    out gl_PerVertex {
        vec4 gl_Position;
        float gl_PointSize;
        float gl_ClipDistance[];
    };

Furthermore, GLSL 4.30 contains an example of an unsized array
occurring inside an interface block.  From section 4.3.9 (Interface
Blocks):

    uniform Transform {  // API uses "Transform[2]" to refer to instance 2
        mat4           ModelViewMatrix;
        mat4           ModelViewProjectionMatrix;
        vec4           a[];  // array will get implicitly sized
        float          Deformation;
    } transforms[4];

This patch adds compiler tests to verify that in and out blocks can
contain unsized arrays.

Verified using the NVIDIA proprietary driver for Linux.
Test accuracy of dFdx and dFdy functions.

Mesa/i965 currently (as of commit 1cc3b90) has an inaccurate
implementation of dFdy() which produces the same results for every
pixel in an aligned 2x2 block.  This piglit test exposes the
inaccuracy.
gs: Test core GS inputs on GLSL 1.50
gs: Test corner case for triangle strip ordering with primitive restart.

Verified using the NVIDIA proprietary driver for linux.
!UPSTREAM: Test unsized arrays in interface blocks

TODO:
- Validate on NVIDIA