texelFetch: require ALPHA in the visual

VISUAL_RGBA is apparantly lies
glsl-1.50: add more negative tests for interface block linking

A few tests to make sure that interface blocks are defined
the same during intrastage and interstage linking.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
glsl-1.50: add complex VS+FS interface blocks execution test

This test provides a complex test of using interface blocks.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
shader_runner: remove explicit #version from outerProduct generated tests.

It will be added based on the GLSL requirement instead.

Also make it clearer that these shader_test files are automatically generated.

Same number of passes on Sandy Bridge running all.tests without glean.

v2: Add missing comment #

Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Tom Gall <tom.gall@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
glsl-fs-main-return-conditional: Test for using return in main

Similar to glsl-fs-main-return (and glsl-vs-main-return), this is testing
using return in main. Contrary to the these other tests, this hits both
the cases where the return path is and is NOT taken (the gallivm code
got it wrong and always did an early exit which got unnoticed by the
existing tests, see https://bugs.freedesktop.org/show_bug.cgi?id=62357).

v2: use mod() instead of integer arithmetic suggested by Ian Romanick.
This gets rid of the glsl 1.30 requirement. And do minor simplifications.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
util: move #define GLXBadProfileARB from .c file to .h file

Some of the ES tests check for this error code.  If the installed
glxproto.h file isn't new enough this symbol may be missing and
compilation will fail.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
primgen: new test for PRIMITIVES_GENERATED query

v2: cosmetic changes as suggested by Eric
ext_framebuffer_multisample: skip negative-max-samples

If ARB_texture_multisample or ARB_internalformat_query are supported,
the limits and/or errors generated are different, so skip this test.

V2: - Emit a useful message when skipping.
V3: - Indentation

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
arb_texture_multisample: add new negative-max-samples test

This covers the sample count limits for both renderbuffers and
multisample textures, when ARB_texture_multisample is supported.

Skips if ARB_internalformat_query is supported, since that extension
allows the overall sample count limits to be exceeded on a
per-internalformat basis.

V2: - Emit a useful message when skipping.
V3: - Style nits

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl-4.00/ARB_texture_query_lod: Generate compiler tests for built-in functions

For each sampler data type, generate a test for
	(vertex, fragment) shader;
	(glsl-4.00, glsl-1.30 + ARB_texture_query_lod).

The vertex shader tests confirm that textureQueryLOD is not available in
the the vertex shader.

v2: Generate textureQueryLOD if api is ARB_texture_query_lod.
shader_runner: Add 'draw rect tex'

Same as draw rect but allows you to pass tex coordinates.
arb_texture_query_lod: Test textureQueryLOD with nearest filtering.

v2: Use textureQueryLOD instead of textureQueryLOD.
arb_texture_query_lod: Test textureQueryLOD with no mipmapping.

v2: Use textureQueryLOD instead of textureQueryLOD.
shader_runner: Add lod_bias option to texparameter.
arb_texture_query_lod: Test textureQueryLOD with lod-biasing.

v2: Use textureQueryLOD instead of textureQueryLOD.
arb_texture_query_lod: Test textureQueryLOD with linear filtering.

v2: Use textureQueryLOD instead of textureQueryLOD.
arb_texture_query_lod: Add execution shader_tests to all.tests.
util: Create generic piglit_draw_rect() functions.  TODO: rework.

This patch adds the following functions to piglit-util-gl-common:
- piglit_draw_rect_generic
- piglit_draw_rect_back_generic
- piglit_draw_rect_z_generic
- piglit_draw_rect_tex_generic

These functions are similar to corresponding functions without the
"_generic" suffix, except that instead of delivering vertex position
and texture coordinates to the vertex shader using glVertexPointer()
and glTexCoordPointer(), they deliver to the generic attributes
PIGLIT_ATTRIB_POS and PIGLIT_ATTRIB_TEX.  These functions use VBO's
and VAO's when available, so they may be used when testing core
contexts.

These functions also work with compatibility contexts and with all
GLES versions.  Since GLES1 doesn't support generic vertex attributes,
we fall back to using glVertexPointer() and glTexCoordPointer() in the
GLES1 case.

When building GLES tests, the behaviour of the new _generic functions
is for all intents and purposes the same as that of the pre-existing
non-generic functions.  So to avoid code duplication, the non-generic
functions simply call their generic equivalents in GLES builds.