diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 67846aac2fe..91c2d256785 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -2048,13 +2048,26 @@ ntq_setup_gs_inputs(struct v3d_compile *c) * in the input primitive, but here we only care about the * per-vertex input type. */ - const struct glsl_type *type = glsl_without_array(var->type); + assert(glsl_type_is_array(var->type)); + const struct glsl_type *type = glsl_get_array_element(var->type); unsigned array_len = MAX2(glsl_get_length(type), 1); unsigned loc = var->data.driver_location; resize_qreg_array(c, &c->inputs, &c->inputs_array_size, (loc + array_len) * 4); + if (var->data.compact) { + for (unsigned j = 0; j < array_len; j++) { + unsigned input_idx = c->num_inputs++; + unsigned loc_frac = var->data.location_frac + j; + unsigned loc = var->data.location + loc_frac / 4; + unsigned comp = loc_frac % 4; + c->input_slots[input_idx] = + v3d_slot_from_slot_and_component(loc, comp); + } + continue; + } + for (unsigned j = 0; j < array_len; j++) { unsigned num_elements = glsl_get_vector_elements(type); for (unsigned k = 0; k < num_elements; k++) {