glsl: simplify loop in varying_matches::assign_locations()

The use of break/continue was kind of weird/confusing.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Brian Paul
2017-12-15 14:27:55 -07:00
parent 47b4183c92
commit cd7705de44

View File

@@ -1834,13 +1834,13 @@ varying_matches::assign_locations(struct gl_shader_program *prog,
const uint64_t slot_mask = ((1ull << slots) - 1) << (*location / 4u);
assert(slots > 0);
if (reserved_slots & slot_mask) {
*location = ALIGN(*location + 1, 4);
slot_end = *location + num_components - 1;
continue;
if ((reserved_slots & slot_mask) == 0) {
break;
}
break;
*location = ALIGN(*location + 1, 4);
slot_end = *location + num_components - 1;
}
if (!var->data.patch && slot_end >= MAX_VARYING * 4u) {