diff options
-rw-r--r-- | src/glsl/link_varyings.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 9cc77feb78a..1ff25b85253 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -959,19 +959,8 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var) type = type->fields.array; } - if (type->is_array()) { - slots = 1; - while (type->is_array()) { - slots *= type->length; - type = type->fields.array; - } - slots *= type->matrix_columns; - } else { - slots = type->matrix_columns; - } - if (type->without_array()->is_dual_slot_double()) - slots *= 2; - this->matches[this->num_matches].num_components = 4 * slots; + slots = type->count_attribute_slots(false); + this->matches[this->num_matches].num_components = slots * 4; } else { this->matches[this->num_matches].num_components = var->type->component_slots(); |