getBaseAlignment: Round up structure sizes to max alignment
This commit is contained in:
parent
e23c9849c2
commit
79b7046a27
1 changed files with 5 additions and 0 deletions
|
|
@ -959,6 +959,11 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
|
||||||
size += memberSize;
|
size += memberSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The structure may have padding at the end; the base offset of
|
||||||
|
// the member following the sub-structure is rounded up to the next
|
||||||
|
// multiple of the base alignment of the structure.
|
||||||
|
RoundToPow2(size, maxAlignment);
|
||||||
|
|
||||||
return maxAlignment;
|
return maxAlignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue