Commit 87a5e2a8 by John Kessenich

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

parent 837c6380
...@@ -695,12 +695,16 @@ int TScanContext::tokenizeIdentifier() ...@@ -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))
......
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