[Mesa-dev] [PATCH 1/1] glsl: warning: pragma `invariant(all)' not supported in GLSL ES 1.00

Oliver McFadden oliver.mcfadden at linux.intel.com
Fri Jul 6 03:16:08 PDT 2012


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 at linux.intel.com>
---
 src/glsl/glsl_parser.yy |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 5ca8740..8d27ef2 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -297,7 +297,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);
-- 
1.7.8



More information about the mesa-dev mailing list