glsl: Fix location bias for patch variables.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 24 Jun 2016 07:09:00 +0000 (00:09 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Aug 2016 06:53:42 +0000 (23:53 -0700)
commit398428f40684addd0a1465cf268436e8b1865351
treea5b452baa9cca764d28af0b8d8ff2a3c3682851e
parent1556f16e46ba3037c3901808c2e1ac5df8e2b20e
glsl: Fix location bias for patch variables.

We need to subtract VARYING_SLOT_PATCH0, not VARYING_SLOT_VAR0.

Since "patch" only applies to inputs and outputs, we can just handle
this once outside the switch statement, rather than replicating the
check twice and complicating the earlier conditions.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/glsl/linker.cpp