Adding new extension GL_OVR_multiview

GL_OVR_multiview functions exactly the same as GL_OVR_multiview2.
All GL_OVR_multiview2 tests now also repeat the same test using GL_OVR_multiview

Bug: angleproject:3341
Change-Id: I7e5294fb6bbf7692535174a15da6a42e1b5fc4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575904
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/CollectVariables.cpp b/src/compiler/translator/CollectVariables.cpp
index cbaaf83..813eb13 100644
--- a/src/compiler/translator/CollectVariables.cpp
+++ b/src/compiler/translator/CollectVariables.cpp
@@ -554,7 +554,8 @@
                 else
                 {
                     ASSERT(mShaderType == GL_VERTEX_SHADER &&
-                           IsExtensionEnabled(mExtensionBehavior, TExtension::OVR_multiview2));
+                           (IsExtensionEnabled(mExtensionBehavior, TExtension::OVR_multiview2) ||
+                            IsExtensionEnabled(mExtensionBehavior, TExtension::OVR_multiview)));
                 }
                 break;
             default:
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index b987d18..5dfe9da 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -565,7 +565,8 @@
     }
 
     if ((compileOptions & SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW) &&
-        parseContext.isExtensionEnabled(TExtension::OVR_multiview2) &&
+        (parseContext.isExtensionEnabled(TExtension::OVR_multiview2) ||
+         parseContext.isExtensionEnabled(TExtension::OVR_multiview)) &&
         getShaderType() != GL_COMPUTE_SHADER)
     {
         DeclareAndInitBuiltinsForInstancedMultiview(root, mNumViews, mShaderType, compileOptions,
@@ -975,6 +976,7 @@
         << ":NV_shader_framebuffer_fetch:" << mResources.NV_shader_framebuffer_fetch
         << ":ARM_shader_framebuffer_fetch:" << mResources.ARM_shader_framebuffer_fetch
         << ":OVR_multiview2:" << mResources.OVR_multiview2
+        << ":OVR_multiview:" << mResources.OVR_multiview
         << ":EXT_YUV_target:" << mResources.EXT_YUV_target
         << ":EXT_geometry_shader:" << mResources.EXT_geometry_shader
         << ":MaxVertexOutputVectors:" << mResources.MaxVertexOutputVectors
diff --git a/src/compiler/translator/ExtensionBehavior.cpp b/src/compiler/translator/ExtensionBehavior.cpp
index e602819..c903ff8 100644
--- a/src/compiler/translator/ExtensionBehavior.cpp
+++ b/src/compiler/translator/ExtensionBehavior.cpp
@@ -29,6 +29,7 @@
     OP(OES_EGL_image_external_essl3)             \
     OP(OES_standard_derivatives)                 \
     OP(OES_texture_storage_multisample_2d_array) \
+    OP(OVR_multiview)                            \
     OP(OVR_multiview2)                           \
     OP(ANGLE_multi_draw)
 
diff --git a/src/compiler/translator/ExtensionBehavior.h b/src/compiler/translator/ExtensionBehavior.h
index 161cc66..9c55f8f 100644
--- a/src/compiler/translator/ExtensionBehavior.h
+++ b/src/compiler/translator/ExtensionBehavior.h
@@ -34,6 +34,7 @@
     OES_EGL_image_external_essl3,
     OES_standard_derivatives,
     OES_texture_storage_multisample_2d_array,
+    OVR_multiview,
     OVR_multiview2,
     ANGLE_multi_draw,
 };
diff --git a/src/compiler/translator/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index aec19c9..99ae558 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -61,6 +61,10 @@
     {
         extBehavior[TExtension::ARM_shader_framebuffer_fetch] = EBhUndefined;
     }
+    if (resources.OVR_multiview)
+    {
+        extBehavior[TExtension::OVR_multiview] = EBhUndefined;
+    }
     if (resources.OVR_multiview2)
     {
         extBehavior[TExtension::OVR_multiview2] = EBhUndefined;
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index d7257eb..cc24ec6 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -264,6 +264,7 @@
     mUsesPointSize   = false;
     mUsesInstanceID  = false;
     mHasMultiviewExtensionEnabled =
+        IsExtensionEnabled(mExtensionBehavior, TExtension::OVR_multiview) ||
         IsExtensionEnabled(mExtensionBehavior, TExtension::OVR_multiview2);
     mUsesViewID                  = false;
     mUsesVertexID                = false;
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 588488a..19d0fda 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -219,6 +219,12 @@
 
 TParseContext::~TParseContext() {}
 
+bool TParseContext::anyMultiviewExtensionAvailable()
+{
+    return isExtensionEnabled(TExtension::OVR_multiview) ||
+           isExtensionEnabled(TExtension::OVR_multiview2);
+}
+
 bool TParseContext::parseVectorFields(const TSourceLoc &line,
                                       const ImmutableString &compString,
                                       int vecSize,
@@ -1345,8 +1351,7 @@
 
     // If multiview extension is enabled, "in" qualifier is allowed in the vertex shader in previous
     // parsing steps. So it needs to be checked here.
-    if (isExtensionEnabled(TExtension::OVR_multiview2) && mShaderVersion < 300 &&
-        qualifier == EvqVertexIn)
+    if (anyMultiviewExtensionAvailable() && mShaderVersion < 300 && qualifier == EvqVertexIn)
     {
         error(location, "storage qualifier supported in GLSL ES 3.00 and above only", "in");
     }
@@ -3104,8 +3109,7 @@
             return;
         }
     }
-    else if (isExtensionEnabled(TExtension::OVR_multiview2) &&
-             typeQualifier.qualifier == EvqVertexIn)
+    else if (anyMultiviewExtensionAvailable() && typeQualifier.qualifier == EvqVertexIn)
     {
         // This error is only specified in WebGL, but tightens unspecified behavior in the native
         // specification.
@@ -4533,7 +4537,9 @@
     }
     else if (qualifierType == "num_views" && mShaderType == GL_VERTEX_SHADER)
     {
-        if (checkCanUseExtension(qualifierTypeLine, TExtension::OVR_multiview2))
+        if (checkCanUseOneOfExtensions(
+                qualifierTypeLine, std::array<TExtension, 2u>{
+                                       {TExtension::OVR_multiview, TExtension::OVR_multiview2}}))
         {
             parseNumViews(intValue, intValueLine, intValueString, &qualifier.numViews);
         }
@@ -4595,7 +4601,7 @@
     {
         case GL_VERTEX_SHADER:
         {
-            if (mShaderVersion < 300 && !isExtensionEnabled(TExtension::OVR_multiview2))
+            if (mShaderVersion < 300 && !anyMultiviewExtensionAvailable())
             {
                 error(loc, "storage qualifier supported in GLSL ES 3.00 and above only", "in");
             }
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index b82816e..b5bf8ae 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -42,6 +42,7 @@
                   const ShBuiltInResources &resources);
     ~TParseContext();
 
+    bool anyMultiviewExtensionAvailable();
     const angle::pp::Preprocessor &getPreprocessor() const { return mPreprocessor; }
     angle::pp::Preprocessor &getPreprocessor() { return mPreprocessor; }
     void *getScanner() const { return mScanner; }
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index a79c506..78f33de 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -199,6 +199,7 @@
     resources->EXT_shader_framebuffer_fetch             = 0;
     resources->NV_shader_framebuffer_fetch              = 0;
     resources->ARM_shader_framebuffer_fetch             = 0;
+    resources->OVR_multiview                            = 0;
     resources->OVR_multiview2                           = 0;
     resources->EXT_YUV_target                           = 0;
     resources->EXT_geometry_shader                      = 0;
diff --git a/src/compiler/translator/SymbolTable_autogen.cpp b/src/compiler/translator/SymbolTable_autogen.cpp
index da96962..756bf7b 100644
--- a/src/compiler/translator/SymbolTable_autogen.cpp
+++ b/src/compiler/translator/SymbolTable_autogen.cpp
@@ -1603,13 +1603,13 @@
     BuiltInId::gl_ViewID_OVR,
     BuiltInName::gl_ViewID_OVR,
     SymbolType::BuiltIn,
-    TExtension::OVR_multiview2,
+    TExtension::UNDEFINED,
     StaticType::Get<EbtUInt, EbpHigh, EvqViewIDOVR, 1, 1>());
 constexpr const TVariable kVar_gl_ViewID_OVRESSL1(
     BuiltInId::gl_ViewID_OVRESSL1,
     BuiltInName::gl_ViewID_OVR,
     SymbolType::BuiltIn,
-    TExtension::OVR_multiview2,
+    TExtension::UNDEFINED,
     StaticType::Get<EbtInt, EbpHigh, EvqViewIDOVR, 1, 1>());
 constexpr const TVariable kVar_gl_ViewportIndex(
     BuiltInId::gl_ViewportIndex,
@@ -16806,7 +16806,8 @@
                 }
             }
         }
-        if (mResources.OVR_multiview2 && mShaderType != GL_COMPUTE_SHADER)
+        if ((mResources.OVR_multiview || mResources.OVR_multiview2) &&
+            mShaderType != GL_COMPUTE_SHADER)
         {
             switch (nameHash)
             {
@@ -17296,7 +17297,8 @@
                 }
             }
         }
-        if (mResources.OVR_multiview2 && mShaderType != GL_COMPUTE_SHADER)
+        if ((mResources.OVR_multiview || mResources.OVR_multiview2) &&
+            mShaderType != GL_COMPUTE_SHADER)
         {
             switch (nameHash)
             {
diff --git a/src/compiler/translator/TranslatorESSL.cpp b/src/compiler/translator/TranslatorESSL.cpp
index 786a291..d67cf17 100644
--- a/src/compiler/translator/TranslatorESSL.cpp
+++ b/src/compiler/translator/TranslatorESSL.cpp
@@ -132,7 +132,8 @@
     {
         if (iter->second != EBhUndefined)
         {
-            const bool isMultiview = (iter->first == TExtension::OVR_multiview2);
+            const bool isMultiview = (iter->first == TExtension::OVR_multiview) ||
+                                     (iter->first == TExtension::OVR_multiview2);
             if (getResources().NV_shader_framebuffer_fetch &&
                 iter->first == TExtension::EXT_shader_framebuffer_fetch)
             {
diff --git a/src/compiler/translator/TranslatorGLSL.cpp b/src/compiler/translator/TranslatorGLSL.cpp
index 4bd8f54..5752f95 100644
--- a/src/compiler/translator/TranslatorGLSL.cpp
+++ b/src/compiler/translator/TranslatorGLSL.cpp
@@ -277,7 +277,8 @@
             }
         }
 
-        const bool isMultiview = (iter.first == TExtension::OVR_multiview2);
+        const bool isMultiview =
+            (iter.first == TExtension::OVR_multiview) || (iter.first == TExtension::OVR_multiview2);
         if (isMultiview && getShaderType() == GL_VERTEX_SHADER &&
             (compileOptions & SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER) != 0u)
         {
diff --git a/src/compiler/translator/builtin_symbols_hash_autogen.txt b/src/compiler/translator/builtin_symbols_hash_autogen.txt
index 46fc273..5b0be6c 100644
--- a/src/compiler/translator/builtin_symbols_hash_autogen.txt
+++ b/src/compiler/translator/builtin_symbols_hash_autogen.txt
@@ -1 +1 @@
-defc05f112e255400323d95b3610cfeb
\ No newline at end of file
+6edf8fb36322aa738e34a1ef287a4d33
\ No newline at end of file
diff --git a/src/compiler/translator/builtin_variables.json b/src/compiler/translator/builtin_variables.json
index f9461b4..078b7d5 100644
--- a/src/compiler/translator/builtin_variables.json
+++ b/src/compiler/translator/builtin_variables.json
@@ -856,13 +856,12 @@
         }
     },
     "Multiview":{
-        "condition":"mResources.OVR_multiview2 && shaderType != GL_COMPUTE_SHADER",
+        "condition":"(mResources.OVR_multiview||mResources.OVR_multiview2) && shaderType != GL_COMPUTE_SHADER",
         "subgroups":{
             "ESSL3":{
                 "variables":{
                     "gl_ViewID_OVR":{
                         "level":"ESSL3_BUILTINS",
-                        "extension":"OVR_multiview2",
                         "type":{
                             "basic":"UInt",
                             "precision":"High",
@@ -876,7 +875,6 @@
                     "gl_ViewID_OVR":{
                         "suffix":"ESSL1",
                         "level":"ESSL1_BUILTINS",
-                        "extension":"OVR_multiview2",
                         "type":{
                             "basic":"Int",
                             "precision":"High",
diff --git a/src/compiler/translator/glslang.l b/src/compiler/translator/glslang.l
index 8af29a8..5c82a12 100644
--- a/src/compiler/translator/glslang.l
+++ b/src/compiler/translator/glslang.l
@@ -82,7 +82,6 @@
 static int ES2_reserved_ES3_keyword(TParseContext *context, int token);
 static int ES2_keyword_ES3_reserved(TParseContext *context, int token);
 static int ES2_ident_ES3_keyword(TParseContext *context, int token);
-static int ES2_ident_ES3_keyword_multiview_keyword(TParseContext *context, int token);
 static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
 static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
 static int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token);
@@ -213,7 +212,7 @@
 
 "struct"       { return STRUCT; }
 
-"layout"  { return ES2_ident_ES3_keyword_multiview_keyword(context, LAYOUT); }
+"layout"  { return ES2_ident_ES3_keyword(context, LAYOUT); }
 
 "yuvCscStandardEXT"    { return ES3_extension_keyword_else_ident(context, TExtension::EXT_YUV_target, YUVCSCSTANDARDEXT); }
 "itu_601"              { return yuvcscstandardext_constant(context); }
@@ -523,22 +522,6 @@
     return token;
 }
 
-int ES2_ident_ES3_keyword_multiview_keyword(TParseContext *context, int token)
-{
-    struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
-    yyscan_t yyscanner = (yyscan_t) context->getScanner();
-
-    // not a reserved word in GLSL ES 1.00, so could be used as an identifier/type name
-    // except when multiview extension is enabled
-    if (context->getShaderVersion() < 300 && !context->isExtensionEnabled(TExtension::OVR_multiview))
-    {
-        yylval->lex.string = AllocatePoolCharArray(yytext, yyleng);
-        return check_type(yyscanner);
-    }
-
-    return token;
-}
-
 int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token)
 {
     yyscan_t yyscanner = (yyscan_t) context->getScanner();
diff --git a/src/compiler/translator/glslang.y b/src/compiler/translator/glslang.y
index fb38828..6a7da3d 100644
--- a/src/compiler/translator/glslang.y
+++ b/src/compiler/translator/glslang.y
@@ -136,8 +136,8 @@
     }  \
 } while (0)
 
-#define ES2_ONLY(S, L) {  \
-    if (context->getShaderVersion() != 100) do {  \
+#define ES2_ONLY(S, L) do {  \
+    if (context->getShaderVersion() != 100) {  \
         context->error(L, " supported in GLSL ES 1.00 only", S);  \
     }  \
 } while (0)
@@ -148,12 +148,6 @@
     }  \
 } while (0)
 
-#define ES3_OR_NEWER_OR_MULTIVIEW(TOKEN, LINE, REASON) do {  \
-    if (context->getShaderVersion() < 300 && !context->isExtensionEnabled(TExtension::OVR_multiview)) {  \
-        context->error(LINE, REASON " supported in GLSL ES 3.00 and above only", TOKEN);  \
-    }  \
-} while (0)
-
 #define ES3_1_ONLY(TOKEN, LINE, REASON) do {  \
     if (context->getShaderVersion() != 310) {  \
         context->error(LINE, REASON " supported in GLSL ES 3.10 only", TOKEN);  \
@@ -897,7 +891,7 @@
 
 layout_qualifier
     : LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN {
-        ES3_OR_NEWER_OR_MULTIVIEW("layout", @1, "qualifier");
+        ES3_OR_NEWER("layout", @1, "qualifier");
         $$ = $3;
     }
     ;
diff --git a/src/compiler/translator/glslang_lex.cpp b/src/compiler/translator/glslang_lex.cpp
index 2bf0ab3..638c1d3 100644
--- a/src/compiler/translator/glslang_lex.cpp
+++ b/src/compiler/translator/glslang_lex.cpp
@@ -1221,7 +1221,6 @@
 static int ES2_reserved_ES3_keyword(TParseContext *context, int token);
 static int ES2_keyword_ES3_reserved(TParseContext *context, int token);
 static int ES2_ident_ES3_keyword(TParseContext *context, int token);
-static int ES2_ident_ES3_keyword_multiview_keyword(TParseContext *context, int token);
 static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
 static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
 static int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token);
@@ -2047,7 +2046,7 @@
 	YY_BREAK
 case 87:
 YY_RULE_SETUP
-{ return ES2_ident_ES3_keyword_multiview_keyword(context, LAYOUT); }
+{ return ES2_ident_ES3_keyword(context, LAYOUT); }
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
@@ -3888,22 +3887,6 @@
     return token;
 }
 
-int ES2_ident_ES3_keyword_multiview_keyword(TParseContext *context, int token)
-{
-    struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
-    yyscan_t yyscanner = (yyscan_t) context->getScanner();
-
-    // not a reserved word in GLSL ES 1.00, so could be used as an identifier/type name
-    // except when multiview extension is enabled
-    if (context->getShaderVersion() < 300 && !context->isExtensionEnabled(TExtension::OVR_multiview2))
-    {
-        yylval->lex.string = AllocatePoolCharArray(yytext, yyleng);
-        return check_type(yyscanner);
-    }
-
-    return token;
-}
-
 int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token)
 {
     yyscan_t yyscanner = (yyscan_t) context->getScanner();
@@ -4109,4 +4092,3 @@
     return 0;
 }
 
- 
\ No newline at end of file
diff --git a/src/compiler/translator/glslang_tab.cpp b/src/compiler/translator/glslang_tab.cpp
index e092656..bf4efe8 100644
--- a/src/compiler/translator/glslang_tab.cpp
+++ b/src/compiler/translator/glslang_tab.cpp
@@ -738,37 +738,37 @@
   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   253,   253,   254,   257,   264,   267,   272,   277,   282,
-     287,   296,   302,   305,   308,   311,   314,   317,   323,   330,
-     336,   339,   347,   350,   356,   359,   365,   369,   376,   384,
-     387,   390,   396,   399,   402,   405,   412,   413,   414,   415,
-     423,   424,   427,   430,   437,   438,   441,   447,   448,   452,
-     459,   460,   463,   466,   469,   475,   476,   479,   485,   486,
-     493,   494,   501,   502,   509,   510,   516,   517,   523,   524,
-     530,   531,   537,   538,   544,   545,   546,   547,   551,   552,
-     553,   557,   561,   565,   569,   576,   579,   585,   592,   599,
-     602,   605,   609,   613,   617,   621,   625,   632,   639,   642,
-     649,   657,   674,   684,   687,   693,   697,   701,   705,   712,
-     719,   722,   726,   730,   735,   742,   746,   750,   754,   759,
-     766,   770,   776,   779,   785,   789,   796,   802,   806,   810,
-     813,   816,   825,   830,   834,   837,   840,   843,   846,   850,
-     853,   857,   860,   863,   866,   869,   872,   879,   886,   889,
-     892,   898,   905,   908,   914,   917,   920,   923,   929,   932,
-     939,   944,   951,   956,   967,   970,   973,   976,   979,   982,
-     986,   990,   994,   998,  1002,  1006,  1010,  1014,  1018,  1022,
-    1026,  1030,  1034,  1038,  1042,  1046,  1050,  1054,  1058,  1062,
-    1066,  1073,  1076,  1079,  1082,  1085,  1088,  1091,  1094,  1097,
-    1100,  1103,  1106,  1109,  1112,  1115,  1118,  1121,  1124,  1127,
-    1130,  1133,  1136,  1146,  1153,  1160,  1163,  1166,  1169,  1172,
-    1175,  1178,  1181,  1184,  1187,  1190,  1193,  1196,  1199,  1202,
-    1210,  1210,  1213,  1213,  1219,  1222,  1228,  1231,  1238,  1242,
-    1248,  1251,  1257,  1261,  1265,  1266,  1272,  1273,  1274,  1275,
-    1276,  1277,  1278,  1282,  1286,  1286,  1286,  1293,  1294,  1298,
-    1298,  1299,  1299,  1304,  1308,  1315,  1319,  1326,  1327,  1331,
-    1337,  1341,  1350,  1350,  1357,  1360,  1366,  1370,  1376,  1376,
-    1381,  1381,  1385,  1385,  1393,  1396,  1402,  1405,  1411,  1415,
-    1422,  1425,  1428,  1431,  1434,  1442,  1448,  1454,  1457,  1463,
-    1463
+       0,   248,   248,   249,   252,   259,   262,   267,   272,   277,
+     282,   291,   297,   300,   303,   306,   309,   312,   318,   325,
+     331,   334,   342,   345,   351,   354,   360,   364,   371,   379,
+     382,   385,   391,   394,   397,   400,   407,   408,   409,   410,
+     418,   419,   422,   425,   432,   433,   436,   442,   443,   447,
+     454,   455,   458,   461,   464,   470,   471,   474,   480,   481,
+     488,   489,   496,   497,   504,   505,   511,   512,   518,   519,
+     525,   526,   532,   533,   539,   540,   541,   542,   546,   547,
+     548,   552,   556,   560,   564,   571,   574,   580,   587,   594,
+     597,   600,   604,   608,   612,   616,   620,   627,   634,   637,
+     644,   652,   669,   679,   682,   688,   692,   696,   700,   707,
+     714,   717,   721,   725,   730,   737,   741,   745,   749,   754,
+     761,   765,   771,   774,   780,   784,   791,   797,   801,   805,
+     808,   811,   820,   825,   829,   832,   835,   838,   841,   845,
+     848,   852,   855,   858,   861,   864,   867,   874,   881,   884,
+     887,   893,   900,   903,   909,   912,   915,   918,   924,   927,
+     934,   939,   946,   951,   962,   965,   968,   971,   974,   977,
+     981,   985,   989,   993,   997,  1001,  1005,  1009,  1013,  1017,
+    1021,  1025,  1029,  1033,  1037,  1041,  1045,  1049,  1053,  1057,
+    1061,  1068,  1071,  1074,  1077,  1080,  1083,  1086,  1089,  1092,
+    1095,  1098,  1101,  1104,  1107,  1110,  1113,  1116,  1119,  1122,
+    1125,  1128,  1131,  1141,  1148,  1155,  1158,  1161,  1164,  1167,
+    1170,  1173,  1176,  1179,  1182,  1185,  1188,  1191,  1194,  1197,
+    1205,  1205,  1208,  1208,  1214,  1217,  1223,  1226,  1233,  1237,
+    1243,  1246,  1252,  1256,  1260,  1261,  1267,  1268,  1269,  1270,
+    1271,  1272,  1273,  1277,  1281,  1281,  1281,  1288,  1289,  1293,
+    1293,  1294,  1294,  1299,  1303,  1310,  1314,  1321,  1322,  1326,
+    1332,  1336,  1345,  1345,  1352,  1355,  1361,  1365,  1371,  1371,
+    1376,  1376,  1380,  1380,  1388,  1391,  1397,  1400,  1406,  1410,
+    1417,  1420,  1423,  1426,  1429,  1437,  1443,  1449,  1452,  1458,
+    1458
 };
 #endif
 
@@ -3735,7 +3735,7 @@
   case 151:
 
     {
-       ES3_OR_NEWER("layout", (yylsp[-3]), "qualifier");
+        ES3_OR_NEWER("layout", (yylsp[-3]), "qualifier");
         (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
     }
 
@@ -5199,4 +5199,3 @@
 int glslang_parse(TParseContext* context) {
     return yyparse(context, context->getScanner());
 }
- 
\ No newline at end of file
diff --git a/src/compiler/translator/glslang_tab.h b/src/compiler/translator/glslang_tab.h
index e05076f..5ffee8a 100644
--- a/src/compiler/translator/glslang_tab.h
+++ b/src/compiler/translator/glslang_tab.h
@@ -43,6 +43,7 @@
 
 #define YYLTYPE TSourceLoc
 #define YYLTYPE_IS_DECLARED 1
+#define YYLTYPE_IS_TRIVIAL 1
 
 /* Token type.  */
 #ifndef YYTOKENTYPE