Add some more qualifier helper functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21173 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
6e4d1087a4
commit
1d923219fe
@ -232,19 +232,60 @@ public:
|
|||||||
bool readonly : 1;
|
bool readonly : 1;
|
||||||
bool writeonly : 1;
|
bool writeonly : 1;
|
||||||
|
|
||||||
bool isMemory()
|
bool isMemory() const
|
||||||
{
|
{
|
||||||
return coherent || volatil || restrict || readonly || writeonly;
|
return coherent || volatil || restrict || readonly || writeonly;
|
||||||
}
|
}
|
||||||
bool isInterpolation()
|
bool isInterpolation() const
|
||||||
{
|
{
|
||||||
return flat || smooth || nopersp;
|
return flat || smooth || nopersp;
|
||||||
}
|
}
|
||||||
bool isAuxillary()
|
bool isAuxillary() const
|
||||||
{
|
{
|
||||||
return centroid || patch || sample;
|
return centroid || patch || sample;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isPipeInput() const
|
||||||
|
{
|
||||||
|
switch (storage) {
|
||||||
|
case EvqVaryingIn:
|
||||||
|
case EvqFragCoord:
|
||||||
|
case EvqPointCoord:
|
||||||
|
case EvqFace:
|
||||||
|
case EvqVertexId:
|
||||||
|
case EvqInstanceId:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isPipeOutput() const
|
||||||
|
{
|
||||||
|
switch (storage) {
|
||||||
|
case EvqPosition:
|
||||||
|
case EvqPointSize:
|
||||||
|
case EvqClipVertex:
|
||||||
|
case EvqVaryingOut:
|
||||||
|
case EvqFragColor:
|
||||||
|
case EvqFragDepth:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isUniform() const
|
||||||
|
{
|
||||||
|
switch (storage) {
|
||||||
|
case EvqUniform:
|
||||||
|
case EVqBuffer:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
|
// Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
|
||||||
void clearLayout()
|
void clearLayout()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user