piglit: don't report fail for WAFFLE_ERROR_BUILT_WITHOUT_SUPPORT

If we build waffle w/out ES support and we run all.tests, quick.tests,
etc. we get lots of 'fail' results for the ES tests.  This change causes
those tests to be reported as 'skip' instead.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
genmipmap-errors: fix/add extension checks

GL_DEPTH24_STENCIL8 is defined by GL_EXT_packed_depth_stencil.
GL_DEPTH32F_STENCIL8 is from GL_ARB_depth_buffer_float, not
GL_ARB_texture_float.

Reviewed-by: Eric Anholt <eric@anholt.net>
arb_viewport_array: add test to check for a MacOS AMD bug

glScissorIndexed() doesn't seem to behave properly.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
s3tc-errors: fix bad call to glPixelStorei()

Passing a negative value for GL_UNPACK_SKIP_PIXELS raises a GL error
that we don't want.  Just pass 0 for both SKIP_PIXELS and SKIP_ROWS.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
rendermode-feedback: add static, const qualifiers

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
glean/blendFunc: use larger test stride for --quick option

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glean/pixelformats: use test stride of 13 for --quick option

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glean/pointatten: use test stride of 5 for --quick option

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
shader_runner: add missing 'void' in function declarations

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
shader_runner: check for no GLSL program in setup_ubos()

If we're running an ARB_vertex/fragment_program test, there will be
no GLSL shader program and 'prog' will be zero.  Return early to avoid
generating an error from the GL_ACTIVE_UNIFORM_BLOCKS query.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
bugzilla 71822: Fix regression introduced to piglit-run.py

The commit 0618aa38d4a8a7c82994fb28a41576da9a2cc414 introduces a
regression when using the -t/--include-filter or -x/--exclude-filter
options. This is caused by the __iter__ magic method in the
core.Environment class returning self.__dict__.iteritems(), which
returns compiled regex objects. This will cause the json encoder to
choke.

This patch corrects the __iter__ method in core.Environment to yield
regex items as regex.pattern, and attribute storing the original string
used to create the pattern.

Tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Test layered color clears with all layered texture types.

This test is similar to the existing clear-color test, except that it
tests all possible layered attachment types, and it's capable of
testing both mipmapped and non-mipmapped textures.

Verified using the Nvidia proprietary driver for Linux, version
313.18.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Test mixing of GLSL versions between VS and GS.

This introduces a new test: "shaders/version-mixing vs-gs", which is
known to fail with Mesa revision 81b998c.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Check that uniform block link errors are detected when skipping stages.

In Mesa, as of commit f38ac41, uniform blocks are only validated
between adjacent shader stages.  That means that if a program contains
vertex, geometry, and fragment shader stages, and the vertex and
fragment shader stages refer to a uniform block that isn't referred to
by the geometry stage, then some linker checks may not be performed.

Most possible link errors get detected at a later stage of linking,
but I found one case that wasn't; this test exercises that case.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_transform_feedback3: add test for buffer binding with invalid index

Passes on NVIDIA (304.88 on GTX 660) and on Ivy Bridge.

v2 (Ian):
   - ask the driver the maximum amount of streams supported
     instead of treating 'GL_MAX_TRANSFORM_FEEDBACK_BUFFERS' as the
     value.
   - keep on trying the different combinations even if one of them
     fails.
   - try also maximum allowed for success
   - used size 'sizeof(GLfloat)' instead of '1' for
     'glBindBufferRange()'. Otherwise even the positive case of
     maximum supported fails on NVIDIA.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_transform_feedback3: add test for querying with invalid index

Passes on NVIDIA (304.88 on GTX 660) and on Ivy Bridge.

v2 (Ian):
   - ask the driver the maximum amount of streams supported
     instead of treating 'GL_MAX_VERTEX_STREAMS' as the value.
   - keep on trying the different combinations even if one of them
     fails.
   - try also maximum allowed for success
   - added to all.tests

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_transform_feedback3: add test for ending non-active query

Passes on NVIDIA (304.88 on GTX 660) and on Ivy Bridge.

v2 (Ian): added to all.tests

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
arb_transform_feedback3: add test trying to draw an invalid stream

Passes on NVIDIA (304.88 on GTX 660).

v2:
   - setup a shader program and vertex buffer object in order
     to really test the invalid stream argument (Ian)
   - add requirement for arb_gpu_shader5

v3:
   - introduce the common header file with pass-thru vertex
     shader text -> needed for rebase

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_transform_feedback3: add test trying to set invalid varyings

Non-existing program case crashes on NVIDIA (319.60 on GTX 660)
but exceeding maximum attribute case passes. Both cases pass on
Ivy Bridge.

v2 (Ian):
   - drop the unnecessary helper variable when setting up
     the array of varying names
   - drop "piglit_require_GLSL_version(150)" as the test already
     requires GL 3.2

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_transform_feedback3: add test trying to set invalid separate mode

Passes on NVIDIA (304.88 on GTX 660) and on Ivy Bridge.

v2 (Ian):
   - drop "piglit_require_GLSL_version(150)" as the test already
     requires 3.2
   - drop doxygen comment style where not necessary
   - let 'asprintf()' allocate space for the generated varying
     names insetad of using one larger chunk and managing it
     manually
   - added the mandatory (max_vertices = 1) into the output layout
     declaration

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>