glsl: Handle attribute aliasing in attribute storage limit check.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 2 Sep 2015 17:42:57 +0000 (10:42 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 3 Sep 2015 06:28:20 +0000 (23:28 -0700)
commitc3294ca5a13cf3f0eb3d9907a46ff8ce4bc2963b
tree8d02ae71f743575b61a41b0d36b6b371be900d4f
parent6e3730452152ca74ad3b51bf1dd4b69b20dbc019
glsl: Handle attribute aliasing in attribute storage limit check.

In various versions of OpenGL and GLSL, it's possible to declare
multiple VS input variables with aliasing attribute locations.

So, when computing the storage requirements for vertex attributes,
we can't simply add up the sizes.  Instead, we need to look at the
enabled slots.

This patch begins tracking which attributes are double types that
are larger than 128-bits (i.e. take up two vec4 slots).  We then
count normal attributes once, and count the double-size attributes
a second time.

Fixes deQP functional.attribute_location.bind_aliasing.max_cond_* tests
on i965, which regressed with commit ad208d975a6d3aebe14f7c2c16039ee20.

No Piglit changes on llvmpipe (which actually supports dvecs).

Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/linker.cpp