atomic counter offset should align to 4
atomic counter offset should align to 4 Ref: glspec46.core - 6.8 BufferObjectState offset restriction multiple of 4
This commit is contained in:
parent
bd97b6f9f2
commit
5db058c020
3 changed files with 72 additions and 66 deletions
|
|
@ -6035,6 +6035,10 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
|
|||
offset = qualifier.layoutOffset;
|
||||
else
|
||||
offset = atomicUintOffsets[qualifier.layoutBinding];
|
||||
|
||||
if (offset % 4 != 0)
|
||||
error(loc, "atomic counters offset should align based on 4:", "offset", "%d", offset);
|
||||
|
||||
symbol.getWritableType().getQualifier().layoutOffset = offset;
|
||||
|
||||
// Check for overlap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue