ir_set_program_inouts_visitor::mark_whole_variable(ir_variable *var)
{
const glsl_type *type = var->type;
-
+ bool is_vertex_input = false;
if (this->shader_stage == MESA_SHADER_GEOMETRY &&
var->data.mode == ir_var_shader_in && type->is_array()) {
type = type->fields.array;
type = type->fields.array;
}
- mark(this->prog, var, 0,
- var->count_attribute_slots(this->shader_stage == MESA_SHADER_VERTEX),
+ if (this->shader_stage == MESA_SHADER_VERTEX &&
+ var->data.mode == ir_var_shader_in)
+ is_vertex_input = true;
+
+ mark(this->prog, var, 0, type->count_attribute_slots(is_vertex_input),
this->shader_stage);
}