glslang: Allow GL_ARB_explicit_attrib_location to add "layout" keyword pre version 140.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30647 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2015-04-09 21:04:44 +00:00
parent 837c6380f3
commit 87a5e2a84b

View File

@ -695,12 +695,16 @@ int TScanContext::tokenizeIdentifier()
return keyword; return keyword;
case LAYOUT: case LAYOUT:
{
const int numLayoutExts = 2;
const char* layoutExts[numLayoutExts] = { GL_ARB_shading_language_420pack,
GL_ARB_explicit_attrib_location };
if ((parseContext.profile == EEsProfile && parseContext.version < 300) || if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140 && (parseContext.profile != EEsProfile && parseContext.version < 140 &&
! parseContext.extensionsTurnedOn(1, &GL_ARB_shading_language_420pack))) ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
return identifierOrType(); return identifierOrType();
return keyword; return keyword;
}
case SHARED: case SHARED:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) || if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140)) (parseContext.profile != EEsProfile && parseContext.version < 140))