Move getBufferReferenceAlignment to be a method of TType
This is a better place for it logically, since it is not specific to glsl->spirv translation. And in a future change I want to use it outside of glslangtospv.
This commit is contained in:
parent
79d25ea0ce
commit
7895e473c3
2 changed files with 17 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue