framework: Don't create Glean result dir if it's a variable.

I want to be able to get a list of commands being run without specifying
an actual result directory.  So, I'm specifying it as $GLEAN_RESULT_DIR.

In that case, I don't want it to create a literal directory called
$GLEAN_RESULT_DIR.  (The % is for python-style substitutions.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Add a new "piglit-print-commands.py" command.

This prints a list of all the tests and how to run them:

piglit test name ::: /path/to/piglit/bin/program <args>
glean test name ::: PIGLIT_TEST='...' /path/to/piglit/bin/glean -v -v -v ...

This may be of use to our QA team, who currently use their own
infrastructure for running test suites.  Having their runner launch
piglit-run.py, which parses all.tests, for every test case, is
incredibly expensive.

This is not meant to be a long term solution.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
framework: Accelerate generation of test list in all.tests

This improves the speed of both piglit-print-commands.py and
piglit-run.py:

Before:
time ./piglit-print-commands.py -t 'asmparsertest/ARBfp1.0/size_specifier-31.txt' -x 'asmparsertest/ARBfp1.0/size_specifier-31.txt'.+ -x valgrind/ tests/all.tests
asmparsertest/ARBfp1.0/size_specifier-31.txt ::: /GFX/Test/Piglit/piglit/framework/../bin/asmparsertest -auto ARBfp1.0 tests/asmparsertest/shaders/ARBfp1.0/size_specifier-31.txt

real    0m1.171s
user    0m1.132s
sys     0m0.039s

After:
time ./piglit-print-commands.py -t 'asmparsertest/ARBfp1.0/size_specifier-31.txt' -x 'asmparsertest/ARBfp1.0/size_specifier-31.txt'.+ -x valgrind/ tests/all.tests
asmparsertest/ARBfp1.0/size_specifier-31.txt ::: /GFX/Test/Piglit/piglit/framework/../bin/asmparsertest -auto ARBfp1.0 tests/asmparsertest/shaders/ARBfp1.0/size_specifier-31.txt

real    0m0.331s
user    0m0.299s
sys     0m0.031s

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
[chad: Shortened commit subject.]
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>
Test that MSAA blits work properly even when unaligned.

This test verifies that blits involving MSAA buffers work properly
even if the source and destination rectangles are located in different
parts of their respective framebuffers, and even if the source and
destination rectangles are not aligned to powers of two.

These are necessary corner cases to check in i965, where blits that
involve MSAA buffers frequently require special handling when the
source and destination rectangles are different, or are not nicely
aligned.

v2: Use a tile size of 49 instead of 50, so that source and
destination rectangles are even more poorly aligned.  This exposed a
bug in i965/gen6.
WIP: clip and scissor blit test