vbo: fix glVertexAttribI* functions

The functions were broken, because they converted ints to floats.
Now we can finally advertise OpenGL 3.0. ;)

In this commit, the vbo module also tracks the type for each attrib
in addition to the size. It can be one of FLOAT, INT, UNSIGNED_INT.

The little ugliness is the vertex attribs are declared as floats even though
there may be integer values. The code just copies integer values into them
without any conversion.

This implementation passes the glVertexAttribI piglit test which I am going
to commit in piglit soon. The test covers vertex arrays, immediate mode and
display lists.

NOTE: This is a candidate for the stable branches.

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

v2: cosmetic changes as suggested by Brian
configure.ac: require libdrm_radeon 2.4.40
r600g: add in-place DB decompression and texturing with DB tiling

The decompression is done in-place and only the compressed tiles are
decompressed. Note: R6xx-R7xx can do that only with Z16 and Z32F.

The texture unit is programmed to use non-displayable tiling and depth
ordering of samples, so that it can fetch the texture in the native DB format.

The latest version of the libdrm surface allocator is required for stencil
texturing to work. The old one didn't create the mipmap tree correctly.
We need a separate mipmap tree for stencil, because the stencil mipmap
offsets are not really depth offsets/4.

There are still some known bugs, but this should save some memory and it also
improves performance a little bit in Lightsmark (especially with low
resolutions; tested with Radeon HD 5000).

The DB->CB copy is still used for transfers.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
scons: Require libdrm_radeon 2.4.40.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
glsl: change int->unsigned to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glsl: add 'f' suffix to floats to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glsl: remove incorrect 'struct' keyword

ir_variable is a class, not a struct.  Fixes an MSVC warning.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glsl: fix signed/unsigned comparision warnings on MSVC

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
st/mesa: add int cast to silence warning

MSVC warns that negating an unsigned value yields an unsigned value.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
st/mesa: change glsl_to_tgsi_visitor from class to struct

To match the declaration in the .h file and silence an MSVC warning.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: fix assorted MSVC conversion warnings in format_pack.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: s/int/GLuint/ in get.c to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: s/GLint/GLuint/ in matrix.c to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: fix signed/unsigned MSVC warnings in fbobject.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
vbo: use GLuint for numInstances to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: silence MSVC signed/unsigned warning in texstorage.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: silence MSVC signed/unsigned warning in texgetmage.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
tnl: fix MSVC signed/unsigned warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
swrast: fix MSVC signed/unsigned warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: fix MSVC signed/unsigned warnings in transformfeedback.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>