glsl: warning: pragma `invariant(all)' not supported in GLSL ES 1.00
authorOliver McFadden <oliver.mcfadden@linux.intel.com>
Thu, 5 Jul 2012 08:22:06 +0000 (11:22 +0300)
committerOliver McFadden <oliver.mcfadden@linux.intel.com>
Thu, 26 Jul 2012 10:09:15 +0000 (13:09 +0300)
The OpenGL(R) ES Shading Language
Version 1.00 Revision 17 (12 May, 2009)

> 4.6.1 The Invariant Qualifier
> ... To force all output variables to be invariant, use the pragma
> #pragma STDGL invariant(all)

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/glsl_parser.yy

index b2533c8476f2b0257f758be9a2cec45fbde9f512..f61d6b8dd3e8ee4298740608fc00ee4723caf5ce 100644 (file)
@@ -301,7 +301,7 @@ pragma_statement:
        | PRAGMA_OPTIMIZE_OFF EOL
        | PRAGMA_INVARIANT_ALL EOL
        {
-          if (state->language_version < 120) {
+          if (state->language_version < 120 && !state->Const.GLSL_100ES) {
              _mesa_glsl_warning(& @1, state,
                                 "pragma `invariant(all)' not supported in %s",
                                 state->version_string);