cmake: If using Waffle, require waffle >= 1.3

Subsequent patches will enable creation of forward-compatible and debug
contexts, which arrived in waffle-1.3.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/waffle: Print more info context creation fails

When waffle_config_choose() or waffle_context_create() fails, print the
Waffle's error message to stderr. Several people (Carl, Ian, Timothy
Arceri) have requested this.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/waffle: Refactor error message when context creation fails

Unify the 3 occurences of message "Failed to create ... context", and
move the message closer to the failure.

Add function context_description(), which creates a string that
describes the context. This will help when forward-compatible and debug
contexts arrive.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/gl: Support creation of forward-compatible contexts

Add a new boolean flag to the PIGLIT_GL_TEST_CONFIG block,
`config.require_forward_compatible_context`. If the test is unable to
create a foward-compatible context, then the test skips.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/gl: Support creation of debug contexts

Add a new boolean flag to the PIGLIT_GL_TEST_CONFIG block,
`config.require_debug_context`. If the test is unable to create a debug
context, then the test skips.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/wfl: Remove hacks for compat contexts

When a test requested a compatibility context, Piglit did not pass the
context version to Waffle. Instead, Piglit requested an unversioned
compatibility context and then verified with piglit_get_gl_version()
that the actual version was >= requested version.

This hack prevented Piglit from creating forward-compatible contexts,
because, according to thw EGL_KHR_create_context spec, "requesting
a forward-compatible context for OpenGL versions less than
3.0 will generate an error."

Remove the hack. Pass the requested context version to Waffle.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gl-3.0: Add test for the forward-compatible bit

Create a context with or without the forward-compatible bit, according to
a command line flag.  Then verify that GL_CONTEXT_FLAGS does or does not
contain GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT.

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