fbo-framework: check for ARB_framebuffer_object

If we just blindly call glBindFramebuffer, that will cause the piglit
test to skip. Make sure that ARB_framebuffer_object is supported first.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
framework: flush out screen prints explicitly

Without the flush, updates only happen whenever the buffer overfills,
which can be tens of tests.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: there are 0 completed tests at the beginning

This fixes a minor annoyance, that the test id displayed was lower than
the completed count in single-threaded runs.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: keep track of running stats and display them

This will display a line that looks like:
[00076/11064] fail: 1, pass: 55, skip: 19 Running Test(s): 00075

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
arb_vertex_array_bgra: Test that the valid usage is accepted

This is mostly copied from vertex-array-bgra.c.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
arb_vertex_array_bgra: Test all the invalid types

Inspired by by code in vertex-array-bgra.c.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
arb_vertex_array_bgra: Remove vertex-array-bgra.c

It was redundant with arb_vertex_array_bgra-api-errors, and it had some
bugs that were already fixed in arb_vertex_array_bgra-api-errors.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
glean: Remove VertArrayBGRATest::testAPI

It was redundant with arb_vertex_array_bgra-api-errors, and it had some
bugs that were already fixed in arb_vertex_array_bgra-api-errors.  I'm
keeping the glean rendering test because I believe that it's the only
rendering test in piglit for BGRA arrays.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
texturing/s3tc-errors: double check GL_TEXTURE parameters and alloc

If the GL does not actually support one of the compression formats in
s3tc_formats, it may silently choose a different actual internalformat.

In such a case, the resulting compressed image size may be larger,
leading to memory corruption when the bigger-than-expected image is read
back with glGetCompressedTexImage() into a buffer that was allocated to
the expected, smaller, size.

Instead, first confirm the texture has really been compressed, that the
format is as expected, and that the size matches our pre-computed
expected size.  If any of these fail, set pass to false and spit an
error, but keep going, using the actual format and size returned by the
GL.

Ian Romanick pointed out that "if we're going to all this effort, we
should probably go all the way. A follow-on patch should check that
glGetCompressedTexImage doesn't over-run the buffer."

v2:
 * Fixed parameter check block format per Ian Romanick review
 * Updated commit message title per Brian Paul review
 * Function call continuation lines align with open '(' (like in rest of
   file).

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Make the generated constant array size tests respect extensions.

In 89603add5ad0bf02fcfcb7fdc0149c09f5aa2988, I neglected to update the
constant array size test generator.  In the following commit, I added a
bunch of AMD_shader_trinary_minmax tests which then got generated
without the #extension directive and put in the wrong place.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Add multisample scaled blit tests to all.py.

These were accidentally forgotten, so the actual rendering tests never
got run---only the negative/error checking test.
framework tests: Adds tests to ensure builtin tests work

Specifically this adds initializer tests which would have exposed the
bug in 90a256411.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
tests: Add tests to import the test lists in tests/

These try to import all.py, all_cl.py etc, if they raise an error then
the test will fail. This is at least a little sanity around these fairly
insane modules.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
tests/r500.py: Fix bug

This module has had a bug for some time that would prevent it from
running.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>