egl_khr_create_context: Verify that the attributes list can be empty for GLES

v2: - Ask for EGL_OPENGL_ES_BIT renderable type since the defaults for
      major/minor are 1.0, so we can't get an ES2 context with an empty
      attributes list. If ES 1 isn't available, skip.
egl_khr_create_context: Verify that the attributes list pointer can be NULL for GLES

v2: - Ask for EGL_OPENGL_ES_BIT renderable type since the defaults for
      major/minor are 1.0, so we can't get an ES2 context with a null
      attributes list. If ES 1 isn't available, skip.
egl_khr_create_context: Verify that the invalid GL versions are rejected

v2: - Do "pass = pass && ...;" instead of "pass = ... && pass;".
    - Pass EGL_OPENGL_*BIT to _setup() and check versions for the
      specific rendering API.
egl_khr_create_context: Verify that the invalid attributes are rejected for Desktop GL

v2: - Update typo'd (in the spec) EGL_CONTEXT_OPENGL_* names.
    - Ask for EGL_OPENGL_BIT and skip if not available.
    - Call eglBindAPI(EGL_OPENGL_API) after _setup.
    - Fix gl_version condition (from '< 32' to '>= 32').
egl_khr_create_context: Verify that the invalid flags are rejected for Desktop GL

v2: - Correct value of first_valid_flag.
    - Ask for EGL_OPENGL_API and skip if not available.
egl_khr_create_context: Verify that the forward-compatible flag can be accepted for Desktop GL

v2: - Ask for EGL_OPENGL_BIT and skip if not available.
    - Only check EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR if GL
      3.2+
v3: - Only check EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR if GL
      3.0+
    - Skip if GL < 3.0.
egl_khr_create_context: Verify that the attributes list can be empty for Desktop GL
egl_khr_create_context: Verify that the attributes list pointer can be NULL for Desktop GL
egl_khr_create_context: Verify that the invalid flags are rejected for GLES
egl_khr_create_context: Verify that the invalid attributes are rejected for GLES

v2: Fixed EGL_OPENGL_BIT -> EGL_OPENGL_ES_BIT typo which would cause the
    test to pass without actually testing an ES context.
egl_khr_create_context: Verify default major version is 1 for Desktop GL
egl_khr_create_context: Verify default minor version is 0 for Desktop GL
egl_khr_create_context: Allow forward-compatible contexts to be rejected

This reworks the test to test whether
	1) forward-compatible contexts can be created, or
	2) the correct error is generated when they can't.

Previously the test did only the first and would fail if
forward-compatible contexts couldn't be created.
egl_khr_create_context: Brown bag fixes

Namely, don't print anything if the test passes, otherwise this is
interpreted as a warning, as would happen if GLES2 wasn't available;
and EGL_BAD_MATCH is generated if forward-compatible contexts aren't
supported, not EGL_BAD_ATTRIBUTE.
egl_khr_create_context: add extension #defines to common.h

To allow building when the system's eglext.h isn't new enough.
copyteximage: loosen the tolerance for compressed formats

6 bits is enough for the test to pass with the VMware svga driver.
Marek said that 5 bits allows the r300g driver to pass.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
texturing: add full "round trip" test of array depth textures.

This test provokes a bug in Mesa as of 8/23/12 (commit 1cb07bd): when
fast depth clears are performed on multiple layers of a multilayer
depth texture (such as a 2D array or a cubemap texture), the
implementation doesn't properly track the need for depth resolves,
resulting in incorrect data when the texture is later used for
texturing.  See https://bugs.freedesktop.org/show_bug.cgi?id=50270.

Although the bug was initially discovered using cubemap textures, this
test provokes it using a 2D array texture, so that we don't have to
reason about the coordinate transformations involved in cube map
texture lookup.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
egl-util: Add call to piglit_dispatch_default_init()

Fixes egl-nok-swap-region and makes egl-nok-texture-from-pixmap not
crash (but still fails).

Reviewed-by: Paul Berry <stereotype441@gmail.com>
tex3d-depth1: test that a 3D texture w/ depth=1 works properly

Reviewed-by: José Fonseca <jfonseca@vmware.com>
fbo-generatemipmap-formats: increase tolerance for compressed formats

Reviewed-by: Brian Paul <brianp@vmware.com>