Add test to verify GL errors in glGenerateMipmap

It does error checking for glGenerateMipmap() with integer and
packed depth-stencil texture internal formats.

V2: Don't test formats which generate no error. They are covered
in other piglit tests.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
util: Kill macro glewInit

No test actually called glewInit(), because piglit-dispatch #define'd it
to piglit_dispatch_default_init().

This patch removes the macro and replaces each call to glewInit() with
piglit_dispatch_default_init().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util: Remove unused wglew.h

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/egl: Change piglit_expect_egl_error to return a bool

Previously, piglit_expect_egl_error() would terminate the test if an
unexpected error occurred. However, there are many cases when we would
prefer to simply report the error and continue testing.

Commit 83c8ef80 made an analagous change to piglit_check_gl_error(). For
consistency with that function, this commit also renames
piglit_expect_egl_error to piglit_check_egl_error.

In all cases, I replaced
    piglit_expect_egl_error(err, PIGLIT_FAIL)
with
    if (!piglit_check_egl_error(err))
        piglit_report_result(PIGLIT_FAIL)
or some equivalent.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
egl: Add test egl-create-context-verify-gl-flavor (v3)

This test requests various flavors (that is, api and version and profile) of
contexts and verifies that the context's actual flavor is compatible with
the requested flavor.

The following subcases fail on mesa-a196f43 with Intel Sandybridge:
    - For each OpenGL context >= 3.2, context creation fails with EGL
      error EGL_SUCCESS.
    - For OpenGL ES 3.0, the context version reported by glGetString is
      2.0.
All other cases skip or pass.

v2:
    - Document that we use eglGetProcAddress to avoid piglit-dispatch.
    - Also verify that glGetString(GL_VERSION) and
      glGetIntgerv(GL_MAJOR/MINOR_VERSION) return the same version.

v3:
    - Remove incorrect test for ES3.

Reviewed-by: Iam Romanick <idr@freedesktop.org> (v2)
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
GTF: Ask GTF to use a minimal visual chosen by EGL.
gl-3.1: Add a new test for genned object name requirements.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
clearbuffer-display-lists: Fix initial clear color test.

The test claimed that the default value was 0,0,0,1, but the GL 3.0
spec page 263 disagrees.  The test saw 0,0,0,1 when it was written
because a visual with no alpha happened to be chosen, but there's no
guarantee that you don't have alpha, so fix the test, and ask for
alpha in the test so that we can reliably check those bits.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Revert "GL_ARB_ubo/negative-bindbuffer-buffer: New test for API error."

This reverts commit ba79f8c3f85a479e97d43f41bf6d2064a1e174fe.

This test has been replaced with gl-3.0/genned-names,
and the pre-GL-3.0 behavior is relatively unspecified and
uninteresting.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
GL_ARB_texture_buffer_object/formats: Add real support for testing GL core.

Thanks to waffle we can finally do this.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
GL_ARB_texture_buffer_object: Add support for GL core to a few other tests.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
textureSize: Add support for running with core GL.

This lets the textureSize tests for TBOs run on i965.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
util/gl: Set WAFFLE_CONTEXT_PROFILE for compatibility profiles

If piglit_gl_test_config::supports_gl_compat_version was >= 32, then
Piglit neglected to set the WAFFLE_CONTEXT_PROFILE attribute.
Luckily this introduced no errors, because Piglit does not yet contain any
3.2 tests.

Piglit also neglected to set the profile attribute when
piglit_gl_test_config::supports_gl_core_version was >= 32, but this was
safe because the default value of WAFFLE_CONTEXT_PROFILE is
WAFFLE_CONTEXT_CORE_PROFILE for GL versions >= 3.2. However, explicitly
set it anyway for self-documentation.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gitignore: Ignore ninja artifacts

Ninja is a wicked-fast build system backend supported by CMake.