Mesa (7.9): glsl: Allow 'in' and 'out' when 'layout' is also available

Ian Romanick idr at kemper.freedesktop.org
Wed Jan 26 00:51:34 UTC 2011


Module: Mesa
Branch: 7.9
Commit: 179edc673b3525ac86e45a3fb6d4b73ca01dfc8f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=179edc673b3525ac86e45a3fb6d4b73ca01dfc8f

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

glsl: Allow 'in' and 'out' when 'layout' is also available

All of the extensions that add the 'layout' keyword also enable (and
required) the use of 'in' and 'out' with shader globals.

This is related to (piglit) bugzilla #31804.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry picked from commit 82c4b4f88af97395a3d1b01e1998ec828cd5d305)

---

 src/glsl/ast_to_hir.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 9a9289d..7526b83 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1869,9 +1869,11 @@ ast_declarator_list::hir(exec_list *instructions,
        *
        *     Local variables can only use the qualifier const."
        *
-       * This is relaxed in GLSL 1.30.
+       * This is relaxed in GLSL 1.30.  It is also relaxed by any extension
+       * that adds the 'layout' keyword.
        */
-      if (state->language_version < 130) {
+      if ((state->language_version < 130)
+	  && !state->ARB_fragment_coord_conventions_enable) {
 	 if (this->type->qualifier.out) {
 	    _mesa_glsl_error(& loc, state,
 			     "`out' qualifier in declaration of `%s' "




More information about the mesa-commit mailing list