This stops the offset being bumped again when and an explicit
alignment has already been applied.
Fixes alignment issues in:
GL44-CTS.enhanced_layouts.uniform_block_alignment
Note the test still fails due to unrelated issues with doubles.
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
fields[i].offset = glsl_align(offset, expl_align);
next_offset = glsl_align(fields[i].offset + size, align);
}
- }
-
- if (!qual->flags.q.explicit_offset) {
+ } else if (!qual->flags.q.explicit_offset) {
if (align != 0 && size != 0)
next_offset = glsl_align(next_offset + size, align);
}