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.
generated_tests: Fix geometry shader tests to use gl_VerticesIn

Commit ff315ae (Add geometry testing to code-generated tests)
erroneously omitted the parentheses when calling
glPositionIn.length().  It also failed to account for the fact that
the .length() method is unavailable in GLSL 1.10.

This patch modifies the code to use gl_VerticesIn instead, since this
is provided by ARB_geometry_shader4, and hence is available regardless
of the GLSL version being tested.

Thanks to Ken Phillis Jr for discovering this bug.

Cc: Ken Phillis Jr <kphillisjr@gmail.com>
glslparsertest: Fix parsing of GL_SHADING_LANGUAGE_VERSION in GLES.

In desktop GL, glGetString(GL_SHADING_LANGUAGE_VERSION) returns a
string that begins with the supported version number.  But in GLES,
the version number is preceded by the text "OpenGL ES GLSL ES ".  This
was causing glslparsertest to fail to parse the implementation's
supported GLSL version, and that in turn caused parse_glsl_version()
function to access uninitialized memory.

This patch splits parse_glsl_version() into two functions:
parse_glsl_version_number(), which parses the bare version number, and
parse_glsl_version_string(), which expects the prefix "OpenGL ES GLSL
ES " when compiled for GLES testing.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Tom Gall <tom.gall@linaro.org>

v2: Use runtime detection of GLES vs desktop GL.
glslparsertest: Don't require ES compatibility extensions when testing GLES.

glslparsertest should only check for the presence of
GL_ARB_ES{2,3}_compatibility when the test is running under desktop
GL.  GLES never exposes these extensions.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Tom Gall <tom.gall@linaro.org>

v2: Use runtime detection of GLES vs desktop GL.
glslparsertest: Avoid uninitialized vars in parse_glsl_version_number.

Previously, if the user specified an ill-formed GLSL version number
(or the implementation supplied an ill-formed number in its response
to glGetString(GL_SHADING_LANGUAGE_VERSION)), glslparsertest would
access uninitialized variables, resulting in unpredictable (and often
confusing) behaviour.

With this patch, glslparser test accepts version numbers either of the
form "<int>" or "<int>.<int>".  Ill-formed version numbers lead to a
test failure.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Tom Gall <tom.gall@linaro.org>

v2: Add comment explaining the use of sscanf(...) == 0.
framework: Fix issue with generating a report on a Windows system.

Was getting error about an unknown keyword 'wglinfo'.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
glx-query-drawable: Require GLX 1.3

... since that's when it was added.

Signed-off-by: Adam Jackson <ajax@redhat.com>
glx-query-drawable: Add cases for all drawable types

Default is still the GLX 1.2 thing of using a raw Window not a
GLXWindow.

Signed-off-by: Adam Jackson <ajax@redhat.com>
glx: Add GLX 1.3 variants of glx-query-drawable to all.tests

Keep the 1.2-style test name in place to make results before and after
easy to compare.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Change expected behavior for #if with undefined macros.

The GLSL 1.30 specification deviated from the standard behavior of C
preprocessors everywhere by making an undefined macro an error rather
than treating it as a value of 0. This was not actually useful, and
this exception to the standard behavior is dropped in GLSL 4.30.

In the meantime, popular implementations have been ignoring the
specified behavior and implementing the standard behavior anyway. So
expect that.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51631

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.50: add test for interface block member qualifier mismatch

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.10: add uniform type mismatch link test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-es-3.00: add uniform block type mismatch link test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.50: attribute keyword is not allowed within an interface block

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.50: varying keyword is not allowed within an interface block

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.50: add simple test for varying interface block

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.50: move interface-blocks-simple-varying to execution dir

This is not a linker test, but rather tests the execution
of a simple shader utilizing interface blocks.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
arb_texture_multisample: add cmake plumbing

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>