Improve error message of alignment offset
This commit is contained in:
parent
bdba39bae6
commit
9fe5223370
3 changed files with 6 additions and 4 deletions
|
|
@ -9029,7 +9029,8 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ
|
|||
// "The specified offset must be a multiple
|
||||
// of the base alignment of the type of the block member it qualifies, or a compile-time error results."
|
||||
if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment))
|
||||
error(memberLoc, "must be a multiple of the member's alignment", "offset", "");
|
||||
error(memberLoc, "must be a multiple of the member's alignment", "offset",
|
||||
"(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment);
|
||||
|
||||
// GLSL: "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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue