textureSize: Bail out if we fail to link.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
textureSize: Add support for running these tests in GLSL 1.40 mode.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
textureSize: Add support for testing rectangle textures in 1.40.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
textureSize: Add GLSL 1.40 textureSize() to all.tests.

The samplerBuffer tests are currently SKIPs until the test code is added.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
GL_EXT_transform_feedback/negative-prims: New test for error behavior.

Mesa just doesn't emit errors.
glsl-1.40: Add a test for vertex shaders that don't write gl_Position.

Transform feedback is used to get a testable output, and it's this
possibility of using vertex shader execution without rasterization
that led to the change in the spec.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Add GLSL tests for loops with function calls that have side-effects.

Mesa's loop unroller incorrectly unrolls these loops 7 times, when the
function call within the body clearly makes the loop only execute once.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
html: Use isinstance(x, basestring) rather than "str" and "unicode."

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
gl-3.0/minmax: Fix printf format warnings.

Fixes these GCC warnings.
minmax.c: In function ‘max_test_i’:
minmax.c:53:4: warning: format ‘%d’ expects argument of type ‘int’, but
argument 5 has type ‘GLint *’ [-Wformat]
minmax.c:56:3: warning: format ‘%d’ expects argument of type ‘int’, but
argument 4 has type ‘GLint *’ [-Wformat]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Add a test for GL_EXT_unpack_subimage on GLES2

The GL_EXT_unpack_subimage extension just allows GL_UNPACK_ROW_LENGTH,
GL_UNPACK_SKIP_PIXELS and GL_UNPACK_SKIP_ROWS on GLES2. This tries
setting those three values and if the extension is available it will
assert that no error is thrown, otherwise it will assert that
GL_INVALID_ENUM is thrown. It will then try to upload some texture
data with those settings in such a way that if the values were
correctly set it will have one pair of pixels otherwise it will have
another. The texture is then rendered to the framebuffer and the
pixels are compared so it can verify whether the unpack settings were
handled correctly.

As far as I can tell, this is the first GLES2 test so the patch also
creates an all_es2.tests file to contain it.
arb_explicit_location: test for index specified without location

The ARB_explicit_location says it is illegal to specify index without
location in the layout.

Signed-off-by: Dave Airlie <airlied@redhat.com>
blend-api: fix copyright as pointed out by Eric.
arb blend func extended - check errors at glBegin

The spec says we should error after Begin if the blend factors are applied
to an illegal draw buffer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
tests/all.tests: add ARB_blend_func_extended tests to all.tests
glslparsertest doesn't use commas

This lets these tests run when the two extensions are present

Signed-off-by: Dave Airlie <airlied@redhat.com>
GL_EXT_transform_feedback/negative-prims: Remove unused variable.

Fixes this GCC warning.
negative-prims.c: In function ‘piglit_display’:
negative-prims.c:114: warning: unused variable ‘tf’

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
ARB_blend_func_extended: test all blending modes (v2)

This tests all the src1 blending modes along with the SRC_ALPHA_SATURATE mode for dst.
(it also tests SRC_ALPHA_SATURATE for src just to be complete).

This test should complete the tests necessary for merging ARB_blend_func_extended.

cleaned up most of Eric Anholt's review comments

Signed-off-by: Dave Airlie <airlied@redhat.com>
ARB_blend_func_extended: test all blending modes with explicit attrib index

This is the same as the other fbo test except it uses explicit attrib locations
in the shader to set the correct outputs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
all.tests: add new ARB_extended_blend_func tests
draw-elements-base-vertex-bounds: s/NV/ARB/ and add comments

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>