piglit: add compressed texture helper functions

Reviewed-by: Eric Anholt <eric@anholt.net>
s3tc-errors: use new piglit compressed texture helpers

Reviewed-by: Eric Anholt <eric@anholt.net>
compressedteximage: use new piglit compressed texture helpers

Reviewed-by: Eric Anholt <eric@anholt.net>
s3tc-errors: add additional texture size checks

Zero-sized tex images and sub images should not generate an error.
Full images which are not multiples of the block size should also be legal.

Verified w/ NVIDIA's driver.
piglit: add const qualifier for filename param for piglit_compile_shader()
piglit: rename FindLine() to piglit_find_line()
piglit: put 'void' in piglit_is_gles() and piglit_get_gl_version() decls
egl_khr_create_context: Clarify why attributes are rejected in GLES

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
egl_khr_create_context: profile attributes are never invalid for Desktop GL

The EGL_KHR_create_context spec says:

	"If the requested OpenGL version is less than 3.2,
	EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR is ignored and the functionality
	of the context is determined solely by the requested version."

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Replace more if(piglit_get_gl_version() < N)...

These cases were missed by the original semantic patch due to using
fprintf(stderr,... instead of printf.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Brian Paul <brianp@vmware.com>
Use piglit_check_gl_error() instead of block with [f]printf.

Generated from the following semantic patch.

@@
expression RET, MSG;
@@

-	RET = glGetError();
-	if (RET != 0) {
+	if (!piglit_check_gl_error(GL_NO_ERROR))
(
-		printf(MSG,RET);
|
-		fprintf(stderr,MSG,RET);
)
		piglit_report_result(PIGLIT_FAIL);
-	}

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
tests/fbo: remove unused err, error vars
fbo-missing-attachment-clear: remove unused err var
depth-cube-map: remove useless glFinish and piglit_report_result

Reviewed-by: Brian Paul <brianp@vmware.com>
Generate a html summary of skipped tests

Reviewed-by: Brian Paul <brianp@vmware.com>
tests: Remove all uses of glutBitmapCharacter

I'm trying to transition Piglit from using GLUT to using Waffle. This
requires killing all uses of GLUT functions, one-by-one.

Only three tests used glutBitmapCharacter,
    texturing/getteximage-formats
    texturing/texture-packed-formats
    texturing/texwrap
and the test results were not affected by the function. It was used only
in non-auto mode to print information about the texture format to the
window.

These tests were removed from the build when using Waffle, since
glut_waffle does not implement glutBitmapCharacter. This patch returns
them to the build.

Acked-by: Eric Anholt <eric@anholt.net>
Tested-by: Paul Berry <stereotype441@gmail.com>
Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
texline: Remove test

The texline test did not probe any pixels and was not listed in all.tests.
It was not a test at all.

This patch also removes directory tests/mesa, because the utility
functions defined there were only used by texline.

CC: Eric Anholt <eric@anholt.net>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests,util: Wrap glutPostRedisplay with piglit_post_redisplay

I'm trying to transition Piglit from using GLUT to using Waffle. This
requires killing all uses of GLUT functions, one-by-one.

This patch replaces all-but-one instance of glutPostRedisplay with a new
wrapper, piglit_post_redisplay. The sole remaining test that uses
glutPostRedisplay is windowoverlap; but that test doesn't use
piglit-framework, anyway.

Since piglit_escape_exit_key() calls piglit_post_redisplay() which is
defined in piglitutil_gl*, we must now link piglitutil_gl
into piglitglxutil to prevent link errors.

Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests,util: Wrap glutKeyboardFunc with piglit_set_keyboard_func

I'm trying to transition Piglit from using GLUT to using Waffle. This
requires killing all uses of GLUT functions, one-by-one.

This patch replaces all-but-one instance of glutKeyboardFunc with a new
wrapper, piglit_set_keyboard_func. The one remaining test that uses
glutKeyboardFunc is windowoverlap; but that tests doesn't use
piglit-framework, anyway.

Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests,util: Wrap glutSwapBuffers with piglit_swap_buffers

I'm trying to transition Piglit from using GLUT to using Waffle. This
requires killing all uses of GLUT functions, one-by-one.

Two remaining tests called glutSwapBuffers directly, read-front and
texline, for which piglit_preset_results is unsuitable. These tests call
glReadPixels on the front buffer. This patch replaces those calls with
a new wrapper, piglit_swap_buffers.

Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>