Mesa (7.10): glsl: Disallow 'in' and 'out' on globals in GLSL 1.20

Ian Romanick idr at kemper.freedesktop.org
Tue Jan 18 00:28:44 UTC 2011


Module: Mesa
Branch: 7.10
Commit: d81615ee1993ad7da644feab18a53f048bac8b30
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d81615ee1993ad7da644feab18a53f048bac8b30

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Jan  7 16:05:59 2011 -0800

glsl: Disallow 'in' and 'out' on globals in GLSL 1.20

Fixes piglit tests glsl-1.20/compiler/qualifiers/in-01.vert and
glsl-1.20/compiler/qualifiers/out-01.vert and bugzilla #32910.

NOTE: This is a candidate for the 7.9 and 7.10 branches.  This patch
also depends on the previous two commits.
(cherry picked from commit 469ea695bbbc984ebec26b2413ab70d450a283ca)

---

 src/glsl/ast_to_hir.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index e341078..9ca7932 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2079,18 +2079,18 @@ ast_declarator_list::hir(exec_list *instructions,
        *
        * This is relaxed in GLSL 1.30.
        */
-      if (state->language_version < 120) {
+      if (state->language_version < 130) {
 	 if (this->type->qualifier.flags.q.out) {
 	    _mesa_glsl_error(& loc, state,
 			     "`out' qualifier in declaration of `%s' "
-			     "only valid for function parameters in GLSL 1.10.",
-			     decl->identifier);
+			     "only valid for function parameters in %s.",
+			     decl->identifier, state->version_string);
 	 }
 	 if (this->type->qualifier.flags.q.in) {
 	    _mesa_glsl_error(& loc, state,
 			     "`in' qualifier in declaration of `%s' "
-			     "only valid for function parameters in GLSL 1.10.",
-			     decl->identifier);
+			     "only valid for function parameters in %s.",
+			     decl->identifier, state->version_string);
 	 }
 	 /* FINISHME: Test for other invalid qualifiers. */
       }




More information about the mesa-commit mailing list