"alignment of %s", field_type->name);
}
fields[i].offset = qual_offset;
- next_offset = glsl_align(qual_offset + size, align);
+ next_offset = qual_offset + size;
} else {
_mesa_glsl_error(&loc, state, "offset can only be used "
"with std430 and std140 layouts");
"is not a power of 2");
} else {
fields[i].offset = glsl_align(offset, member_align);
- next_offset = glsl_align(fields[i].offset + size, align);
+ next_offset = fields[i].offset + size;
}
}
} else {
fields[i].offset = glsl_align(offset, expl_align);
- next_offset = glsl_align(fields[i].offset + size, align);
+ next_offset = fields[i].offset + size;
}
} else if (!qual->flags.q.explicit_offset) {
if (align != 0 && size != 0)
- next_offset = glsl_align(next_offset + size, align);
+ next_offset = glsl_align(next_offset, align) + size;
}
/* From the ARB_enhanced_layouts spec: