SPV: Distinguish between SPV and non-SPV rules for member overlap.

This commit is contained in:
John Kessenich
2016-10-07 11:50:25 -06:00
parent 087a454af2
commit 19bdf90eba
6 changed files with 94 additions and 15 deletions

View File

@@ -4731,11 +4731,6 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType
if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment))
error(memberLoc, "must be a multiple of the member's alignment", "offset", "");
// "It is a compile-time error to specify an offset that is smaller than the offset of the previous
// member in the block or that lies within the previous member of the block"
if (memberQualifier.layoutOffset < offset)
error(memberLoc, "cannot lie in previous members", "offset", "");
// "The offset qualifier forces the qualified member to start at or after the specified
// integral-constant expression, which will be its byte offset from the beginning of the buffer.
// "The actual offset of a member is computed as