aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-12-15 14:27:55 -0700
committerBrian Paul <[email protected]>2017-12-20 11:23:16 -0700
commitcd7705de443d34aeddb3a68cc8d6b762a2808261 (patch)
treea9ce143af86f78a9c5305bef4ad806c6721608c1 /src/compiler
parent47b4183c92dbfcbeae120117310e1a60ca96b343 (diff)
glsl: simplify loop in varying_matches::assign_locations()
The use of break/continue was kind of weird/confusing. Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/link_varyings.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 6d74f9a4637..7821b1ec816 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -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) {