mesa/shader: return correct attribute location for double matrix arrays
authorDave Airlie <airlied@redhat.com>
Thu, 10 Dec 2015 01:44:34 +0000 (11:44 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 11 Dec 2015 06:28:29 +0000 (16:28 +1000)
commit18ad641c3b2e926b8b3e2bd1df31fa739624cbe4
tree626af22bbc4ed662945cfb159e8adfbbecb0e1e1
parent64c59b06244fc34f015f1f75b8205ac597ab0105
mesa/shader: return correct attribute location for double matrix arrays

If we have a dmat2[4], then dmat2[0] is at 17, dmat2[1] at 19,
dmat2[2] at 21 etc. The old code was returning 17,18,19.

I think this code is also wrong for float matricies as well.

There is now a piglit for the float case.

This partly fixes:
GL41-CTS.vertex_attrib_64bit.limits_test

[airlied: update with Tapani suggestion to clean it up].

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/shader_query.cpp