From 47dde2bd45eb5053042a20f70c6f0b7a86ebf1b1 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 15 Dec 2015 16:23:29 +1100 Subject: [PATCH] glsl: don't try adding built-ins to explicit locations bitmask Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- 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 1da0c9e5527..8763cc5b07d 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -1518,7 +1518,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.11.0