glslang: Allow GL_ARB_explicit_attrib_location to add "layout" keyword pre version...
authorJohn Kessenich <cepheus@frii.com>
Thu, 9 Apr 2015 21:04:44 +0000 (21:04 +0000)
committerJohn Kessenich <cepheus@frii.com>
Thu, 9 Apr 2015 21:04:44 +0000 (21:04 +0000)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30647 e7fa87d3-cd2b-0410-9028-fcbf551c1848

glslang/MachineIndependent/Scan.cpp

index cb01d08..a77d392 100644 (file)
@@ -695,12 +695,16 @@ int TScanContext::tokenizeIdentifier()
         return keyword;
 
     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) ||
             (parseContext.profile != EEsProfile && parseContext.version < 140 &&
-            ! parseContext.extensionsTurnedOn(1, &GL_ARB_shading_language_420pack)))
+            ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
             return identifierOrType();
         return keyword;
-
+    }
     case SHARED:
         if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
             (parseContext.profile != EEsProfile && parseContext.version < 140))