mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0
authorAnuj Phogat <anuj.phogat@gmail.com>
Sat, 29 Mar 2014 00:44:59 +0000 (17:44 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 1 May 2014 17:58:39 +0000 (10:58 -0700)
commit49c71050de1e0df451e29621558b4adfefb7e098
tree74e3aa8852bc084d4ddb335100a9317c6b32291e
parentdc75479b7a7b9207d9d7c9487085ad14fa5d26cc
mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0

In OpenGL 3.1 attribute 0 becomes non-magic, just like in
OpenGL ES 2.0. Earlier versions of OpenGL used attribute 0
exclusively for vertex position.

V2: Add a utility function _mesa_attr_zero_aliases_vertex() in
    varray.h

Fixes 4 Khronos OpenGL CTS failures:
glGetVertexAttrib
depth24_basic
depth24_precision
rgb8_rgba8_rgb

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/varray.c
src/mesa/main/varray.h
src/mesa/vbo/vbo_attrib_tmp.h