[Mesa-stable] [PATCH 2/2] glsl: don't try adding build-ins to explicit locations bitmask
Timothy Arceri
timothy.arceri at collabora.com
Mon Dec 14 21:23:29 PST 2015
Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: 11.1 <mesa-stable at lists.freedesktop.org>
---
src/glsl/link_varyings.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 5a3f53d..4944d19 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -1477,7 +1477,9 @@ reserved_varying_slot(struct gl_shader *stage, ir_variable_mode io_mode)
foreach_in_list(ir_instruction, node, stage->ir) {
ir_variable *const var = node->as_variable();
- if (var == NULL || var->data.mode != io_mode || !var->data.explicit_location)
+ if (var == NULL || var->data.mode != io_mode ||
+ !var->data.explicit_location ||
+ var->data.location < VARYING_SLOT_VAR0)
continue;
var_slot = var->data.location - VARYING_SLOT_VAR0;
--
2.4.3
More information about the mesa-stable
mailing list