Mesa (master): mesa: Fix linker-assigned varying component counting since 8fb1e4a462
Eric Anholt
anholt at kemper.freedesktop.org
Sat Nov 17 21:05:11 UTC 2012
Module: Mesa
Branch: master
Commit: 94e82b2e6cabd7ad26ff35067f6b6675168649d3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=94e82b2e6cabd7ad26ff35067f6b6675168649d3
Author: Eric Anholt <eric at anholt.net>
Date: Tue Nov 13 14:40:22 2012 -0800
mesa: Fix linker-assigned varying component counting since 8fb1e4a462
The goal of that change was to skip counting things that aren't actually
outputs from the VS to the FS. However, explicit_location isn't set in
the case of linker-assigned locations (the common case), so basically
varying component counting got disabled. At this stage of the linker,
we've already ensured that var->location is set, so we can just look at
it without worrying.
Fixes i965 assertion failure with the new
piglit glsl-max-varyings --exceed-limits.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51545
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/glsl/linker.cpp | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 86371b5..3b2ab96 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2010,8 +2010,7 @@ is_varying_var(GLenum shaderType, const ir_variable *var)
{
/* Only fragment shaders will take a varying variable as an input */
if (shaderType == GL_FRAGMENT_SHADER &&
- var->mode == ir_var_in &&
- var->explicit_location) {
+ var->mode == ir_var_in) {
switch (var->location) {
case FRAG_ATTRIB_WPOS:
case FRAG_ATTRIB_FACE:
More information about the mesa-commit
mailing list