util/waffle: Print message when falling back to compatibility context

Some tests declare in their config block that they support running under
both core and compatibility contexts. In this case, Piglit first attempts
to use a core context; if core context creation fails, then Piglit falls
back to the compatibility context.

This patch prints a diagnostic when the fallback occurs.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/waffle: Refactor make_context_current()

This refactor makes the function body more readable.

Understanding the function no longer requires the reader to track the
value of `ok` throughout the function body. Also, some conditional
branches have been removed by using early returns.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/waffle: More wisely handle compat context versions > 1.0

The commit below caused many shader_runner tests to skip on drivers that
lack GLX_ARB_create_context and EGL_KHR_create_context.  This patch fixes
those regressions buy changing the way that Piglit handles requests for
compatibility contexts.

    commit 3a92ffa0eb1efff8ccbe65b5c51710cea8ef0c5c
    Author: Paul Berry <stereotype441@gmail.com>
    Date:   Fri Feb 8 13:04:13 2013 -0800

	shader_runner and glslparsertest: choose GL version more accurately.

The regressing commit set test_config->supports_gl_compat_version to the
least version that is guaranteed to support the GLSL version used by the
test. If supports_gl_compat_version > 10, then a code path was taken in
Waffle that requires the driver to support GLX_ARB_create_context or
EGL_KHR_create_context.

This patch changes piglit_wfl_framework to *not* specify a GL version when
creating a compatibility waffle_context. If context creation succeeds,
Piglit checks that the actual context version satifies the requested
version and skips the test accordingly.

CC: Paul Berry <stereotype441@gmail.com>
Tested-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
scissor-polygon: a replacement for the glean scissor test
remove glean scissor test

Replaced by new piglit scissor-polygon test.
piglit: add piglit_get_prim_name() helper

Reviewed-by: Eric Anholt <eric@anholt.net>
longprim: use piglit_get_prim_name() function

Reviewed-by: Eric Anholt <eric@anholt.net>
shader_runner: use piglit_get_prim_name()

Reviewed-by: Eric Anholt <eric@anholt.net>
degenerate-prims: test that prims with too few vertices don't draw anything

v2: use new piglit_get_prim_name() function.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
polygon-mode-offset: test glPolygonMode + glPolygonOffset

Reviewed-by: José Fonseca <jfonseca@vmware.com>
shader_runner: delay error for program link / use to piglit_display

To prepare for supporting negative linker tests.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
shader_runner: add support for a link-error command for negative tests

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: test for interface block type mismatch error

This tests to see if an interface block with a type mismatch
between the VS and FS causes a link error.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: add basic VS / FS interface block compiler tests

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: make sure 'in' interface blocks are rejected for VS

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: make sure 'out' interface blocks are rejected for FS

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: test interface blocks with GS

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
fbo-blit: test BlitFramebuffer with GL_TEXTURE_RECTANGLE

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Add missing piglit_get_prim_name() for gles3.

Fixes piglit build since the shader_runner change to use this
function.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Add a variant of glsl-fs-pointcoord for gles2.

GLES2 doesn't require GL_POINT_SPRITE, and i965 had a bug in that case.