Merge pull request #1717 from jeffbolznv/getBufferReferenceAlignment

Move getBufferReferenceAlignment to be a method of TType
This commit is contained in:
John Kessenich 2019-03-07 11:05:08 +07:00 committed by GitHub
commit 40c16ec0b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 16 deletions

View file

@ -2188,6 +2188,16 @@ public:
return ! operator==(right);
}
unsigned int getBufferReferenceAlignment() const
{
if (getBasicType() == glslang::EbtReference) {
return getReferentType()->getQualifier().hasBufferReferenceAlign() ?
(1u << getReferentType()->getQualifier().layoutBufferReferenceAlign) : 16u;
} else {
return 0;
}
}
protected:
// Require consumer to pick between deep copy and shallow copy.
TType(const TType& type);