Non-functional: Encapsulate testing for IO that is supposed to be arrayed with extra level for per-vertex data.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27169 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2014-06-27 06:17:16 +00:00
parent 34d687512a
commit a63faa7907
3 changed files with 18 additions and 7 deletions

View file

@ -39,6 +39,7 @@
#include "../Include/Common.h"
#include "../Include/BaseTypes.h"
#include "../Public/ShaderLang.h"
namespace glslang {
@ -384,6 +385,21 @@ public:
}
}
// True if this type of IO is supposed to be arrayed with extra level for per-vertex data
bool isArrayedIo(EShLanguage language) const
{
switch (language) {
case EShLangGeometry:
return isPipeInput();
case EShLangTessControl:
return ! patch && (isPipeInput() || isPipeOutput());
case EShLangTessEvaluation:
return ! patch && isPipeInput();
default:
return false;
}
}
// Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
void clearLayout()
{