OSDN Git Service

glsl: Fix location bias for patch variables.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 24 Jun 2016 07:09:00 +0000 (00:09 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 1 Sep 2016 09:06:23 +0000 (10:06 +0100)
commitfce2e3b493129ce865ee9dec5415604dc2422421
treecbb7a81475759f6036bc2bb78a370b3afe538d7f
parent236172997c09060df81ec7ce871797bb2e048bc4
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>
(cherry picked from commit 398428f40684addd0a1465cf268436e8b1865351)
src/compiler/glsl/linker.cpp