Drop defines of _GNU_SOURCE in tests.

The build system defines it globally.

Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
glean: Use piglit-dispatch instead of calling piglit_get_proc_address().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl-resource-not-bound: test rendering with unbound resources

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_clear_buffer_object: Test multiple formats.

Use glClearBufferData to clear a buffer with all supported internal formats.
arb_clear_buffer_object: Negative test unsupported formats.

Try to clear buffers using unsupported internal formats and check for the
expected errors.
arb_clear_buffer_object: Negative test buffer alignment.

The spec requires the buffer size to be a multiple of the size of the internal
format used for clearing.

Violate this and check for expected errors.
arb_clear_buffer_object: Try to clear a mapped buffer.

This is a negative test.
Try to clear entire buffer while it is entirely mapped.
Check for expected errors.
arb_clear_buffer_object: Negative test without bound buffer.

Try to clear a buffer binding point while no buffer ist bound to it.
Check for expected errors.
arb_clear_buffer_object: Pass NULL as data.

If NULL is passed as the data pointer to glClearBufferData the buffer should be
cleared to all zeros.
arb_clear_buffer_object: Negative test offset and size.

The offset and size parameters of glClearBufferSubData have to oblige to some
restrictions. Violate these and check for errors.
arb_clear_buffer_object: Clear partially mapped buffer.

From the spec:
    "An INVALID_OPERATION error is generated if any part of the specified
     range of the buffer bound to <target> is currently mapped."

This allows to clear a range of a buffer even if another, non-overlapping range
of that buffer is currently mapped.
arb_clear_buffer_object: Clear overlapping ranges.

Consecutively clear multiple, overlapping ranges of a buffer and check the
result.
arb_clear_buffer_object: Clear range of buffer.

Simple test to clear a buffer only partially.
Check that only the desired range was altered.
arb_clear_buffer_object: Clear a 0-length range.

Check that clearing of 0-length ranges is a no-op that doesn't generate any
errors.
arb_gpu_shader5: Add shader tests to verify 'invocations' layout qualifier

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
arb_gpu_shader5: Add compiler tests to verify 'invocations' layout qualifier

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
arb_clear_buffer_object: Avoid void pointer arithmetic.

MSVC does not allow arithmetic on void pointers.
Use char pointers instead.
s3tc-errors: Fix GCC compiler warnings.

The params argument in glGetTexLevelParameteriv is of type GLint*.

This patch fixes these GCC warnings introduced with commit
4f9d98dbaea90c11a930fd774382ff364892ce3f.

s3tc-errors.c:156:6: warning: passing argument 4 of ‘piglit_dispatch_glGetTexLevelParameteriv’ from incompatible pointer type [enabled by default]
      &is_compressed);
      ^
s3tc-errors.c:156:6: note: expected ‘GLint *’ but argument is of type ‘_Bool *’
s3tc-errors.c:158:6: warning: pointer targets in passing argument 4 of ‘piglit_dispatch_glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign]
      &format);
      ^
s3tc-errors.c:158:6: note: expected ‘GLint *’ but argument is of type ‘GLenum *’
s3tc-errors.c:161:6: warning: pointer targets in passing argument 4 of ‘piglit_dispatch_glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign]
      &compressed_size);
      ^
s3tc-errors.c:161:6: note: expected ‘GLint *’ but argument is of type ‘GLuint *’

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
util: add helpers for r11g11b10f

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_vertex_type_10f_10f_11f_rev: add test for api-errors

V2: - Test for normalized = GL_TRUE as well
    - Don't require ARB_vertex_type_2_10_10_10_rev; if this is exposed
      without it, then the implementation is broken and we want
      failures, not skips.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>