зеркало из https://github.com/stride3d/xkslang.git
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:
Родитель
6e4d1087a4
Коммит
1d923219fe
|
@ -232,19 +232,60 @@ public:
|
|||
bool readonly : 1;
|
||||
bool writeonly : 1;
|
||||
|
||||
bool isMemory()
|
||||
bool isMemory() const
|
||||
{
|
||||
return coherent || volatil || restrict || readonly || writeonly;
|
||||
}
|
||||
bool isInterpolation()
|
||||
bool isInterpolation() const
|
||||
{
|
||||
return flat || smooth || nopersp;
|
||||
}
|
||||
bool isAuxillary()
|
||||
bool isAuxillary() const
|
||||
{
|
||||
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
|
||||
void clearLayout()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче