mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 8 Nov 2012 04:29:40 +0000 (20:29 -0800)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Sun, 20 Jan 2013 14:08:27 +0000 (15:08 +0100)
commit422f3bb8ab95f00e17aa969f7a09c7ceee5f8bef
tree352ff2b5fa8f39a8cff91b6e51bb93174b589848
parentcc8ff5354da0eeba5551b5d5bd12898c38e6191f
mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.

Since cf438f5375e242, we store actual integers for the attribute data.
We just need to reinterpret the GLfloat array as a GLint/GLuint array
so we can read the proper data.

Fixes oglconform's glsl-vertex-attrib/basic.VertexAttribI[1234][u]i
subtests (after fixing an unrelated bug in those test cases).

v2: Use the COPY_4V macro to be concise.

NOTE: This is a candidate for the stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com> [v1]
(cherry picked from commit c299f44782d7d7d6719fce622a121aad58856139)
src/mesa/main/varray.c