summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-06-24 00:09:00 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-08-07 23:53:42 -0700
commit398428f40684addd0a1465cf268436e8b1865351 (patch)
treea5b452baa9cca764d28af0b8d8ff2a3c3682851e /src/compiler/glsl/linker.cpp
parent1556f16e46ba3037c3901808c2e1ac5df8e2b20e (diff)
downloadexternal_mesa3d-398428f40684addd0a1465cf268436e8b1865351.zip
external_mesa3d-398428f40684addd0a1465cf268436e8b1865351.tar.gz
external_mesa3d-398428f40684addd0a1465cf268436e8b1865351.tar.bz2
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>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 2271676..1c8860e 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3866,6 +3866,9 @@ add_interface_variables(struct gl_shader_program *shProg,
continue;
};
+ if (var->data.patch)
+ loc_bias = int(VARYING_SLOT_PATCH0);
+
/* Skip packed varyings, packed varyings are handled separately
* by add_packed_varyings.
*/