glsl: remove unused varyings before packing them
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 21 Dec 2015 23:14:45 +0000 (10:14 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 6 Jan 2016 22:06:12 +0000 (09:06 +1100)
commit30991d7389b6b475625ccce2aaae2f3f8cf8e95f
treeddc87be120d68f455aa433074685dd637ab0f3dd
parent0d7477a2899fe74134cd3e12e7adf1eec0c77f7e
glsl: remove unused varyings before packing them

Previously we would pack varyings before trying to remove them, this
relied on the packing pass not packing varyings with a location of -1
to avoid packing varyings that should be removed.
However this meant unused varyings with an explicit location would be
packed before they could be removed when we enable packing of them in a
later patch.

V2: fix regression in V1 removing unused varyings in multi-stage SSO,
fix regression with single stage programs.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/glsl/link_varyings.cpp
src/glsl/link_varyings.h
src/glsl/linker.cpp