unsigned idx = var->data.driver_location;
sf->reg[idx].reg = idx;
sf->reg[idx].slot = var->data.location;
- sf->reg[idx].num_components = 4; /* TODO */
+ sf->reg[idx].num_components = glsl_get_components(var->type);
sf->num_reg = MAX2(sf->num_reg, idx+1);
}
} else {
unsigned idx = var->data.driver_location;
sf->reg[idx].reg = idx + 1;
sf->reg[idx].slot = var->data.location;
- sf->reg[idx].num_components = 4; /* TODO */
+ sf->reg[idx].num_components = glsl_get_components(var->type);
sf->num_reg = MAX2(sf->num_reg, idx+1);
count++;
}
sf->reg[sf->num_reg].reg = native;
sf->reg[sf->num_reg].slot = var->data.location;
- sf->reg[sf->num_reg].num_components = 4; /* TODO */
+ sf->reg[sf->num_reg].num_components = glsl_get_components(var->type);
sf->num_reg++;
}