Commit 1d923219 by John Kessenich

Add some more qualifier helper functions.

parent 6e4d1087
...@@ -232,19 +232,60 @@ public: ...@@ -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()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment