ir_constant *constant = new(this->mem_ctx) ir_constant(i);
ir_dereference_array *dereference_array = new(this->mem_ctx)
ir_dereference_array(rvalue, constant);
- char *subscripted_name
- = ralloc_asprintf(this->mem_ctx, "%s[%d]", name, i);
if (gs_input_toplevel) {
/* Geometry shader inputs are a special case. Instead of storing
* each element of the array at a different location, all elements
* are at the same location, but with a different vertex index.
*/
(void) this->lower_rvalue(dereference_array, fine_location,
- unpacked_var, subscripted_name,
- false, i);
+ unpacked_var, name, false, i);
} else {
+ char *subscripted_name
+ = ralloc_asprintf(this->mem_ctx, "%s[%d]", name, i);
fine_location =
this->lower_rvalue(dereference_array, fine_location,
unpacked_var, subscripted_name,