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>
Test GL_ARB_clear_texture using multisample textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a multi-sample texture. The texture is created with four samples and
then rendered at four times the size with a special shader that
renders every sample.