glsl: fix varying slot allocation for blocks and structs with explicit locations
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 6 Jan 2016 09:22:46 +0000 (20:22 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 6 Jan 2016 22:44:32 +0000 (09:44 +1100)
commite58be8ac0e7ce53ed02721e1432a15f95b026b57
treea9bc05896c93b73b24e767ebc3573136009659eb
parent47dde2bd45eb5053042a20f70c6f0b7a86ebf1b1
glsl: fix varying slot allocation for blocks and structs with explicit locations

Previously each member was being counted as using a single slot,
count_attribute_slots() fixes the count for array and struct members.

Also don't assign a negitive to the unsigned expl_location variable.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/glsl/ast_to_hir.cpp