Previously we would fail to find a match for the second half of a
dvec4 as 'i' would get incremented to 1 before we added the var to
the array at component 0.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
}
while (idx < slot_limit) {
- for (unsigned i = var->data.location_frac; i < last_comp; i++) {
+ unsigned i = var->data.location_frac;
+ while (i < last_comp) {
if (explicit_locations[idx][i] != NULL) {
linker_error(prog,
"%s shader has multiple outputs explicitly "
}
explicit_locations[idx][i] = var;
+ i++;
/* We need to do some special handling for doubles as dvec3 and
* dvec4 consume two consecutive locations. We don't need to