diff options
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |