Don't allow invariant in a function.
authorJohn Kessenich <cepheus@frii.com>
Mon, 11 Nov 2013 23:51:57 +0000 (23:51 +0000)
committerJohn Kessenich <cepheus@frii.com>
Mon, 11 Nov 2013 23:51:57 +0000 (23:51 +0000)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24009 e7fa87d3-cd2b-0410-9028-fcbf551c1848

Test/baseResults/100.frag.out
glslang/MachineIndependent/glslang.y

index 07dc987..49a0847 100644 (file)
@@ -24,10 +24,13 @@ ERROR: 0:47: 'invariant' : can only apply to an output or an input in a non-vert
  \r
 ERROR: 0:50: 'invariant' : can only apply to an output or an input in a non-vertex stage\r
  \r
+ERROR: 0:56: 'invariant' : not allowed in nested scope \r
 ERROR: 0:56: 'invariant' : can only apply to an output or an input in a non-vertex stage\r
  \r
+ERROR: 0:57: 'invariant' : not allowed in nested scope \r
 ERROR: 0:57: 'invariant' : can only apply to an output or an input in a non-vertex stage\r
  \r
+ERROR: 0:59: 'invariant' : not allowed in nested scope \r
 ERROR: 0:59: 'invariant' : can only apply to an output or an input in a non-vertex stage\r
  \r
 ERROR: 0:63: 'invariant' : can only apply to an output or an input in a non-vertex stage\r
@@ -51,7 +54,7 @@ ERROR: 0:111: 'gl_FragDepth' : undeclared identifier
 ERROR: 0:134: 'texture3D' : no matching overloaded function found \r
 ERROR: 0:135: 'texture2DProjLod' : no matching overloaded function found \r
 ERROR: 0:140: '' :  syntax error\r
-ERROR: 46 compilation errors.  No code generated.\r
+ERROR: 49 compilation errors.  No code generated.\r
 \r
 ERROR: node is still EOpNull!\r
 0:3  Sequence\r
index de5438b..1e9cef2 100644 (file)
@@ -1059,6 +1059,7 @@ fully_specified_type
 \r
 invariant_qualifier\r
     : INVARIANT {\r
+        parseContext.globalCheck($1.loc, "invariant");\r
         parseContext.profileRequires($$.loc, ENoProfile, 120, 0, "invariant");\r
         $$.init($1.loc);\r
         $$.qualifier.invariant = true;\r