mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
glsl: calculate component size for arrays of arrays when varying packing disabled
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
1d401f9ce4
commit
abdab88b30
1 changed files with 10 additions and 3 deletions
|
|
@ -956,9 +956,16 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
|
|||
type = type->fields.array;
|
||||
}
|
||||
|
||||
slots = (type->is_array()
|
||||
? (type->length * type->fields.array->matrix_columns)
|
||||
: type->matrix_columns);
|
||||
if (type->is_array()) {
|
||||
slots = 1;
|
||||
while (type->is_array()) {
|
||||
slots *= type->length;
|
||||
type = type->fields.array;
|
||||
}
|
||||
slots *= type->matrix_columns;
|
||||
} else {
|
||||
slots = var->type->matrix_columns;
|
||||
}
|
||||
this->matches[this->num_matches].num_components = 4 * slots;
|
||||
} else {
|
||||
this->matches[this->num_matches].num_components
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue