Merge pull request #2036 from ShchchowAMD/fix_atomic_uint_offset_check
atomic counter offset should align to 4 (compute shader)
This commit is contained in:
commit
c674299ddb
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