arb_uniform_buffer_object: add new rendering test

Add a test that actually draws something with uniform buffer objects
along the lines of what an application might do.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
arb_shading_language_420pack: Add multiple-layout-qualifiers to test list

This test was added back in July 2013, but it wasn't added to the test
list.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
piglit (executable): Make PIGLIT_SOURCE_DIR detection more robust

The initial implementation I committed was a bit hackish and I knew it
at the time, but it seemed to work for all the cases that I tested.
However, there were corner cases. The biggest of these cases is problems
running out of tree with piglit built in tree.
ex: src/piglit/piglit run ...

This patch makes the handling more robust by explicitly searching for
three distinct cases:
1) piglit is run from the source dir, built in the source dir
2) piglit is run from outside the source dir, built in the source dir
3) piglit has been installed out of tree

I have tested all three of these cases, and case 3 if piglit is
installed as piglit.py.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
python: remove all tabs

Python doesn't really support mixed spaces and tabs well, and in python3
upstream finally did the sensible thing and made mixed tab and space
indents a runtime error.

This patch was generated with the following command on Linux:
find . -name '*py' | xargs sed -i -e 's@\t@        @g'

It was then hand edited to fix whitespace errors introduced by tabs not
being 8 spaces.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
fbo: test that swizzle doesn't affect mipmap generation

This is a regression test for a mesa meta bug fix whereby a swizzle set
via GL_ARB_texture_swizzle was being applied while iteratively
generating a mipmap. This meant the swizzle would be applied twice by
the time the application sampled those generated layers.

The bug was originally noticed with code that used a swizzle to emulate
a component alpha texture via a component red texture. In this case the
texture internally only had one component and applying the swizzle
effectively discarded that component. The test follows a similar
pattern, but swizzles from red to green instead of to alpha.

Reviewed-by: Brian Paul <brianp@vmware.com>
.gitignore: ignore ninja files not in the root directory as well

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
arb_shader_atomic_counters: get log from the right shader

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_shader_atomic_counters: gs/tes/tcs all need version 150

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
gl-3.0: Don't query GL_TEXTURE_{LUMINANCE,INTENSITY}_* outside compat profile

There are no queries for GL_TEXTURE_LUMINANCE_SIZE,
GL_TEXTURE_INTENSITY_SIZE, GL_TEXTURE_LUMINANCE_TYPE, or
GL_TEXTURE_INTENSITY_TYPE in any version of OpenGL ES or desktop OpenGL
core profile.

v2: Move call to glGetTexLevelParameteriv to a separate function.
Suggested by Brian.

v3: Move compat_profile to GetTexLevelParameteriv too.  Suggested by
Brian.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
fbo-generatemipmap-1d: Remove unused variables.

Fix clang unused-const-variable warnings.

tests/fbo/fbo-generatemipmap-1d.c:44:20: warning: unused variable 'red' [-Wunused-const-variable]
static const float red[] =   {1, 0, 0, 0};
                   ^
tests/fbo/fbo-generatemipmap-1d.c:45:20: warning: unused variable 'green' [-Wunused-const-variable]
static const float green[] = {0, 1, 0, 0};
                   ^
tests/fbo/fbo-generatemipmap-1d.c:46:20: warning: unused variable 'blue' [-Wunused-const-variable]
static const float blue[] =  {0, 0, 1, 0};
                   ^
tests/fbo/fbo-generatemipmap-1d.c:47:20: warning: unused variable 'white' [-Wunused-const-variable]
static const float white[] = {1, 1, 1, 1};
                   ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glsl-1.50: Don't try to use embedded struct definitions

Interface blocks may contain instances of predeclared structs,
but not embedded definitions.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
ubo: Don't try to use embedded struct definitions.

This isn't explicitly disallowed in the ARB_ubo spec or the GLSL 1.40
spec, but is very clear in the 1.50 spec. I believe this is a
clarification, not a change.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl-1.40: Don't try to use embedded struct definitions

This isn't explicitly disallowed in the ARB_ubo spec or the GLSL
1.40 spec, but is very clear in the 1.50 spec. I believe this is a
clarification, not a change.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Test GL_ARB_clear_texture using 3D textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a 3D texture. Two sub-regions are cleared, one using a NULL data
parameter and one providing a colour. Both regions have a depth
greater than 1. All of the images of the texture are then rendered to
the window and probed for the correct results.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using cube map textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a cube map texture. Each face of the cube map is cleared to a separate
colour and then one pixel of each face is rendered using points. The
colours are then probed to check whether the clear worked. This is
important to test because glClearTexSubImage has some unusual
semantics in that the zoffset parameter is used to select the cube
face.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using a range of base formats

This adds a test for glClearTexSubImage when clearing a sub-region of
a 2D texture using a range of formats that are supported in basic GL.
A utility function is added to test a format combination so that
further tests can be added with other formats that need an extension.

For each format a texture is created and two sub-regions are cleared.
One region is set to all zeroes using NULL as the clear value and the
other is set to a known value. The texture is then retrieved with
glGetTexImage and compared against the expected values.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using depth-stencil textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a depth-stencil texture. This is important to test because it hits a
separate code path in Mesa.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using a range of sized formats

This adds a test for glClearTexSubImage when clearing a sub-region of
a texture using a range of sized internal formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using a range of float formats

This adds a test for glClearTexSubImage when clearing a sub-region of
a texture using a range of float formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using 1- and 2- component textures

This adds a test for glClearTexSubImage when clearing a sub-region of
textures using an internal format of GL_RED and GL_RG.

Reviewed-by: Brian Paul <brianp@vmware.com>