depthstencil-render-miplevels: Add test for size 273.

When a mipmapped depth texture's size satisfies size > 1 and (size %
16) == 1, this causes miplevel 1 to have a size that is a multiple of
8, but not to be aligned on a multiple of 8 boundary.  This turns out
to be an important corner case for the i965 driver.

Note: in an ideal world, I'd modify depthstencil-render-miplevels to
simply test every possible buffer size from 1 to some reasonably large
size (perhaps 256), but this would produce an impractically large
number of test cases.  So instead I'm just testing the sizes that have
been known to cause problems.
add Python Mako module to the list of prerequisites
texunits: increase size of arrays to fix crash

NVIDIA's later GPUs/drivers report 192 combined texture units.
This causes us to read outside the too-small arrays and segfault.

Increase the array sizes and add a check for the future.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
texunits: clean-up GL error checking code

Use piglit_check_gl_error().

Reviewed-by: José Fonseca <jfonseca@vmware.com>
rg-teximage: remove large stack allocations

Don't allocate 1MB arrays on the stack.  Use heap allocations instead.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
fbo-clear-formats: clean up error handling

Use piglit_check_gl_error().  Note: we're getting an INVALID_OPERATION
error from glBlitFramebuffer() with NVIDIA's driver.  That'll be
investigated/fixed separately.  At least the test now reports FAIL
instead of dying on an assertion.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Fix etc2 test for format=COMPRESSED_R11_EAC

waffles-decompressed-etc2-r11-64x32-miptree.ktx contains per pixel RGBA data
generated by ericsson's etcpack tool. While generating decompressed image
for COMPRESSED_R11_EAC format, RED color data for each pixel is copied to
GREEN and BLUE channels as well. Using this image for texturing in OpenGL ES
3.0 (internalFormat=GL_R8) causes GL_INVALID_OPERATION. This is because
glTexImage2D() in GL ES 3.0 doesn't allow internalFormat = GL_R8 with
format= GL_RGBA. To workaround this issue use internalFormat = GL_RGBA and
mask all color channels except Red.

Other option is to edit the waffles-decompressed-etc2-r11-64x32-miptree.ktx
file and set all GREEN, BLUE components to zero. Considering the hassle involved
in editing image file, I won't prefer that.

This fixes the piglit failure on gles3 with COMPRESSED_R11_EAC format.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
glx-query-drawable: Remove unused window variable.

Signed-off-by: Brian Paul <brianp@vmware.com>
glean/tfpexceptions: disable unused print_float() function

It's only called from main(), which was already disabled.

Signed-off-by: Brian Paul <brianp@vmware.com>
glx_arb_create_context: Remove unused variables.

Signed-off-by: Brian Paul <brianp@vmware.com>
Add tests/spec/glsl-es-1.00/execution/maximums shader tests

Adds gl_MaxCombinedTextureImageUnits.shader_test
     gl_MaxDrawBuffers.shader_test
     gl_MaxFragmentUniformVectors.shader_test
     gl_MaxTextureImageUnits.shader_test
     gl_MaxVaryingVectors.shader_test
     gl_MaxVertexAttribs.shader_test
     gl_MaxVertexTextureImageUnits.shader_test
     gl_MaxVertexUniformVectors.shader_test

These check the built-in constants of the same name from
section 7.4 of the glsl es 1.0.17 spec.

v2: squash patch, address one by one spec reference.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
GL_ARB_fragment_program/sparse-samplers: Test for a bug in i965.
glsl-1.40: Add a simple test of math on uniform buffer loads.

Catches an assertion failure/rendering failure in i965.
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