[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'debian-unstable'



 Makefile                                             |   12 +
 debian/changelog                                     |   15 +
 debian/control                                       |   67 ++----
 debian/rules                                         |    9 
 docs/contents.html                                   |    1 
 docs/llvmpipe.html                                   |  204 +++++++++++++++++++
 docs/relnotes-7.10.2.html                            |    9 
 docs/relnotes.html                                   |    1 
 src/gallium/SConscript                               |    1 
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp        |    2 
 src/gallium/drivers/llvmpipe/lp_fence.c              |    3 
 src/glsl/ast_to_hir.cpp                              |    2 
 src/glsl/glcpp/glcpp-parse.c                         |   82 ++++---
 src/glsl/glcpp/glcpp-parse.y                         |   82 ++++---
 src/mesa/drivers/dri/i965/brw_context.c              |   18 +
 src/mesa/drivers/dri/i965/brw_context.h              |    8 
 src/mesa/drivers/dri/i965/brw_eu_emit.c              |   71 +++---
 src/mesa/drivers/dri/i965/brw_fs.cpp                 |    8 
 src/mesa/drivers/dri/i965/brw_vs_emit.c              |   10 
 src/mesa/drivers/dri/i965/gen6_urb.c                 |   27 +-
 src/mesa/drivers/dri/i965/gen6_vs_state.c            |    3 
 src/mesa/drivers/dri/i965/gen6_wm_state.c            |    2 
 src/mesa/drivers/dri/intel/intel_chipset.h           |   13 -
 src/mesa/drivers/dri/intel/intel_context.h           |   30 ++
 src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c |    7 
 src/mesa/drivers/dri/r300/compiler/radeon_optimize.c |   24 ++
 src/mesa/main/get.c                                  |    2 
 src/mesa/program/ir_to_mesa.cpp                      |   28 ++
 28 files changed, 539 insertions(+), 202 deletions(-)

New commits:
commit 0bf8e790960c7c977f83f044369f6e17079a330b
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 2 13:11:24 2011 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index f8929f5..b8b02c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mesa (7.10.2-2) UNRELEASED; urgency=low
+mesa (7.10.2-2) unstable; urgency=low
 
   [ Cyril Brulebois ]
   * Merge upstream 7.10 branch up to b8c6362389.
@@ -11,7 +11,7 @@ mesa (7.10.2-2) UNRELEASED; urgency=low
   * Avoid installing the nouveau_vieux driver into libgl1-mesa-dri
     (Closes: #622222).
 
- -- Cyril Brulebois <kibi@debian.org>  Mon, 02 May 2011 00:28:01 +0200
+ -- Cyril Brulebois <kibi@debian.org>  Mon, 02 May 2011 12:29:37 +0200
 
 mesa (7.10.2-1) unstable; urgency=low
 

commit 7e6ef9c80117c2525e6f851c770e2dba8bf08da6
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 2 09:01:52 2011 +0200

    Get rid of libgl1-mesa-dri-i686, already commented out in control file.
    
    We have a VCS to remember things if needed.

diff --git a/debian/changelog b/debian/changelog
index 4d34443..f8929f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ mesa (7.10.2-2) UNRELEASED; urgency=low
   * Get rid of leading article in short descriptions, taking care of this
     lintian tag for almost all binary packages:
     - description-synopsis-starts-with-article
+  * Get rid of libgl1-mesa-dri-i686, already commented out in control file.
 
   [ Sven Joachim ]
   * Avoid installing the nouveau_vieux driver into libgl1-mesa-dri
diff --git a/debian/control b/debian/control
index 00ea024..93061ba 100644
--- a/debian/control
+++ b/debian/control
@@ -505,27 +505,6 @@ Description: Debugging symbols for the experimental Mesa DRI modules
  .
  This package contains debugging symbols for the extra DRI modules.
 
-#Package: libgl1-mesa-dri-i686
-#Section: libs
-#Priority: extra
-#Architecture: i386 kfreebsd-i386 hurd-i386
-#Pre-Depends: libgl1-mesa-dri
-#Description: A free implementation of the OpenGL API -- DRI modules [i686 optimized]
-# This version of Mesa provides GLX and DRI capabilities: it is capable of
-# both direct and indirect rendering.  For direct rendering, it can use DRI
-# modules from the libgl1-mesa-dri package to accelerate drawing.
-# .
-# This package does not include the OpenGL library itself, only the DRI
-# modules for accelerating direct rendering.
-# .
-# For a complete description of Mesa, please look at the
-# libgl1-mesa-swx11 package.
-# .
-# This set of libraries is optimized for i686 machines and will only be used if
-# you are running a 2.6 kernel on an i686 class CPU. This includes Pentium Pro,
-# Pentium II/II/IV, Celeron CPU's and similar class CPU's (including clones
-# such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA C3 Ezla).
-
 Package: libgl1-mesa-dev
 Section: libdevel
 Architecture: any

commit c0421d6f5568063f0af32b461cfdb19a41c65d77
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 2 09:00:25 2011 +0200

    Address lintian tag: description-synopsis-starts-with-article.

diff --git a/debian/changelog b/debian/changelog
index cbee51d..4d34443 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ mesa (7.10.2-2) UNRELEASED; urgency=low
 
   [ Cyril Brulebois ]
   * Merge upstream 7.10 branch up to b8c6362389.
+  * Get rid of leading article in short descriptions, taking care of this
+    lintian tag for almost all binary packages:
+    - description-synopsis-starts-with-article
 
   [ Sven Joachim ]
   * Avoid installing the nouveau_vieux driver into libgl1-mesa-dri
diff --git a/debian/control b/debian/control
index e0ed63e..00ea024 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,7 @@ Depends:
 Conflicts: mesag3-glide, mesag3-glide2, mesag3+ggi, libgl1, nvidia-glx, mesag3, libgl1-mesa-swrast
 Provides: libgl1, mesag3, libgl1-mesa-swrast
 Replaces: libgl1, mesag3, libgl1-mesa-swrast
-Description: A free implementation of the OpenGL API -- runtime
+Description: free implementation of the OpenGL API -- runtime
  Mesa is a 3-D graphics library with an API which is very similar to
  that of OpenGL.  To the extent that Mesa utilizes the OpenGL command
  syntax or state machine, it is being used with authorization from
@@ -51,7 +51,7 @@ Depends:
 Conflicts: libgl1-mesa-swrast-dbg
 Provides: libgl1-mesa-swrast-dbg
 Replaces: libgl1-mesa-swrast-dbg
-Description: A free implementation of the OpenGL API -- debugging symbols
+Description: free implementation of the OpenGL API -- debugging symbols
  Mesa is a 3-D graphics library with an API which is very similar to
  that of OpenGL.  To the extent that Mesa utilizes the OpenGL command
  syntax or state machine, it is being used with authorization from
@@ -108,7 +108,7 @@ Depends:
 Provides: libgl-dev, mesag-dev, libgl1-mesa-swrast-dev
 Conflicts: mesa-dev, libgl-dev, mesag3 (<< 3.1-1), nvidia-glx-dev, mesag-dev, libgl1-mesa-swrast-dev
 Replaces: libgl-dev, mesag-dev, libgl1-mesa-swrast-dev
-Description: A free implementation of the OpenGL API -- development files
+Description: free implementation of the OpenGL API -- development files
  This package provides the development environment required for
  compiling programs with Mesa.  For a complete description of Mesa,
  please look at the libgl1-mesa-swx11 package.
@@ -127,7 +127,7 @@ Recommends: libegl1-mesa-drivers
 Provides: libegl1-x11
 Conflicts: libegl1-x11
 Replaces: libegl1-x11
-Description: A free implementation of the EGL API -- runtime
+Description: free implementation of the EGL API -- runtime
  This package contains the EGL native platform graphics interface library.
  EGL provides a platform-agnostic mechanism for creating rendering surfaces
  for use with other graphics libraries, such as OpenGL|ES and OpenVG.
@@ -143,7 +143,7 @@ Architecture: linux-any kfreebsd-any
 Depends:
  libegl1-mesa (= ${binary:Version}),
  ${misc:Depends},
-Description: A free implementation of the EGL API -- debugging symbols
+Description: free implementation of the EGL API -- debugging symbols
  This package contains the EGL native platform graphics interface library.
  EGL provides a platform-agnostic mechanism for creating rendering surfaces
  for use with other graphics libraries, such as OpenGL|ES and OpenVG.
@@ -164,7 +164,7 @@ Depends:
  libxdamage-dev,
  libxfixes-dev,
  ${misc:Depends},
-Description: A free implementation of the EGL API -- development files
+Description: free implementation of the EGL API -- development files
  This package contains the development environment required for compiling
  programs against EGL native platform graphics interface library.
  EGL provides a platform-agnostic mechanism for creating rendering surfaces
@@ -180,7 +180,7 @@ Depends:
  ${shlibs:Depends},
  ${misc:Depends},
  libegl1-mesa (= ${binary:Version}),
-Description: A free implementation of the EGL API -- hardware drivers
+Description: free implementation of the EGL API -- hardware drivers
  This package contains the EGL native platform graphics interface library.
  EGL provides a platform-agnostic mechanism for creating rendering surfaces
  for use with other graphics libraries, such as OpenGL|ES and OpenVG.
@@ -195,7 +195,7 @@ Architecture: linux-any kfreebsd-any
 Depends:
  libegl1-mesa-drivers (= ${binary:Version}),
  ${misc:Depends},
-Description: A free implementation of the EGL API -- driver debugging symbols
+Description: free implementation of the EGL API -- driver debugging symbols
  This package contains the EGL native platform graphics interface library.
  EGL provides a platform-agnostic mechanism for creating rendering surfaces
  for use with other graphics libraries, such as OpenGL|ES and OpenVG.
@@ -212,7 +212,7 @@ Depends:
 Provides: libopenvg1
 Conflicts: libopenvg1
 Replaces: libopenvg1
-Description: A free implementation of the OpenVG API -- runtime
+Description: free implementation of the OpenVG API -- runtime
  This package contains the mesa implementation of the OpenVG 2D acceleration
  library.  OpenVG provides a device independent and vendor-neutral interface
  for sophisticated 2D graphical applications, while allowing device
@@ -226,7 +226,7 @@ Architecture: linux-any kfreebsd-any
 Depends:
  libopenvg1-mesa (= ${binary:Version}),
  ${misc:Depends},
-Description: A free implementation of the OpenVG API -- debugging symbols
+Description: free implementation of the OpenVG API -- debugging symbols
  This package contains the mesa implementation of the OpenVG 2D acceleration
  library.  OpenVG provides a device independent and vendor-neutral interface
  for sophisticated 2D graphical applications, while allowing device
@@ -242,7 +242,7 @@ Depends:
  libopenvg1-mesa (= ${binary:Version}),
  libegl1-mesa-dev,
  ${misc:Depends},
-Description: A free implementation of the OpenVG API -- development files
+Description: free implementation of the OpenVG API -- development files
  This package contains the mesa implementation of the OpenVG 2D acceleration
  library.  OpenVG provides a device independent and vendor-neutral interface
  for sophisticated 2D graphical applications, while allowing device
@@ -261,7 +261,7 @@ Depends:
 Provides: libgles1
 Conflicts: libgles1
 Replaces: libgles1
-Description: A free implementation of the OpenGL|ES 1.x API -- runtime
+Description: free implementation of the OpenGL|ES 1.x API -- runtime
  OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
  embedded systems - including consoles, phones, appliances and vehicles.
  It contains a subset of OpenGL plus a number of extensions for the
@@ -276,7 +276,7 @@ Architecture: linux-any kfreebsd-any
 Depends:
  libgles1-mesa (= ${binary:Version}),
  ${misc:Depends},
-Description: A free implementation of the OpenGL|ES 1.x API -- debugging symbols
+Description: free implementation of the OpenGL|ES 1.x API -- debugging symbols
  OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
  embedded systems - including consoles, phones, appliances and vehicles.
  It contains a subset of OpenGL plus a number of extensions for the
@@ -293,7 +293,7 @@ Depends:
  libgles1-mesa (= ${binary:Version}),
  libegl1-mesa-dev,
  ${misc:Depends},
-Description: A free implementation of the OpenGL|ES 1.x API -- development files
+Description: free implementation of the OpenGL|ES 1.x API -- development files
  OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
  embedded systems - including consoles, phones, appliances and vehicles.
  It contains a subset of OpenGL plus a number of extensions for the
@@ -313,7 +313,7 @@ Depends:
 Provides: libgles2
 Conflicts: libgles2
 Replaces: libgles2
-Description: A free implementation of the OpenGL|ES 2.x API -- runtime
+Description: free implementation of the OpenGL|ES 2.x API -- runtime
  OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
  embedded systems - including consoles, phones, appliances and vehicles.
  It contains a subset of OpenGL plus a number of extensions for the
@@ -329,7 +329,7 @@ Architecture: linux-any kfreebsd-any
 Depends:
  libgles2-mesa (= ${binary:Version}),
  ${misc:Depends},
-Description: A free implementation of the OpenGL|ES 2.x API -- debugging symbols
+Description: free implementation of the OpenGL|ES 2.x API -- debugging symbols
  OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
  embedded systems - including consoles, phones, appliances and vehicles.
  It contains a subset of OpenGL plus a number of extensions for the
@@ -347,7 +347,7 @@ Depends:
  libgles2-mesa (= ${binary:Version}),
  libegl1-mesa-dev,
  ${misc:Depends},
-Description: A free implementation of the OpenGL|ES 2.x API -- development files
+Description: free implementation of the OpenGL|ES 2.x API -- development files
  OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
  embedded systems - including consoles, phones, appliances and vehicles.
  It contains a subset of OpenGL plus a number of extensions for the
@@ -369,7 +369,7 @@ Recommends: libgl1-mesa-dri (>= 7.2)
 Conflicts: libgl1, libgl1-mesa-dri (<< 6.4.0)
 Replaces: libgl1, libgl1-mesa-dri (<< 6.4.0)
 Provides: libgl1
-Description: A free implementation of the OpenGL API -- GLX runtime
+Description: free implementation of the OpenGL API -- GLX runtime
  This version of Mesa provides GLX and DRI capabilities: it is capable of
  both direct and indirect rendering.  For direct rendering, it can use DRI
  modules from the libgl1-mesa-dri package to accelerate drawing.
@@ -433,7 +433,7 @@ Suggests: libglide3
 Conflicts: xlibmesa-dri (<< 1:7.0.0)
 Replaces: xlibmesa-dri (<< 1:7.0.0)
 Breaks: xserver-xorg-core (<< 2:1.5), libgl1-mesa-glx (<< 7.2)
-Description: A free implementation of the OpenGL API -- DRI modules
+Description: free implementation of the OpenGL API -- DRI modules
  This version of Mesa provides GLX and DRI capabilities: it is capable of
  both direct and indirect rendering.  For direct rendering, it can use DRI
  modules from the libgl1-mesa-dri package to accelerate drawing.
@@ -472,7 +472,7 @@ Architecture: linux-any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
-Description: A free implementation of the OpenGL API -- Extra DRI modules
+Description: free implementation of the OpenGL API -- Extra DRI modules
  This version of Mesa provides GLX and DRI capabilities: it is capable of
  both direct and indirect rendering.  For direct rendering, it can use DRI
  modules from the libgl1-mesa-dri package to accelerate drawing.
@@ -537,7 +537,7 @@ Depends:
 Conflicts: libgl-dev, libgl1-mesa-dri-dev
 Replaces: libgl-dev, libgl1-mesa-dri-dev
 Provides: libgl-dev, libgl1-mesa-dri-dev
-Description: A free implementation of the OpenGL API -- GLX development files
+Description: free implementation of the OpenGL API -- GLX development files
  This version of Mesa provides GLX and DRI capabilities: it is capable of
  both direct and indirect rendering.  For direct rendering, it can use DRI
  modules from the libgl1-mesa-dri package to accelerate drawing.
@@ -637,7 +637,7 @@ Depends:
  ${shlibs:Depends},
  ${misc:Depends},
 Provides: libglw1
-Description: A free implementation of the OpenGL API -- runtime
+Description: free implementation of the OpenGL API -- runtime
  Mesa is a 3-D graphics library with an API which is very similar to
  that of OpenGL.  To the extent that Mesa utilizes the OpenGL command
  syntax or state machine, it is being used with authorization from
@@ -664,7 +664,7 @@ Depends:
 Provides: mesag3-widgets, mesag-widgets-dev, libglw-dev
 Conflicts: libglw-dev, libgl1-mesa-swx11-dev (<< 6.5.2-4)
 Replaces: libglw-dev
-Description: A free implementation of the OpenGL API -- development files
+Description: free implementation of the OpenGL API -- development files
  This package provides the development environment required for
  compiling programs with the Mesa widgets library, libGLw, which
  allows Motif-based applications to embed an OpenGL drawing context.

commit 7a693d995f541c55c87a8cf2a0bb40029695b569
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Mon May 2 00:59:16 2011 +0200

    Avoid installing nouveau_vieux_dri.so into two packages
    
    Moving nouveau_vieux_dri.so to build/dri/lib/gallium/ in the build
    target has the disadvantage that the upstream Makefile will detect the
    missing file and bring it back later when we run "make install".  So
    let's make the move only when we install the files into the packages.

diff --git a/debian/changelog b/debian/changelog
index 40658f6..cbee51d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
 mesa (7.10.2-2) UNRELEASED; urgency=low
 
+  [ Cyril Brulebois ]
   * Merge upstream 7.10 branch up to b8c6362389.
 
+  [ Sven Joachim ]
+  * Avoid installing the nouveau_vieux driver into libgl1-mesa-dri
+    (Closes: #622222).
+
  -- Cyril Brulebois <kibi@debian.org>  Mon, 02 May 2011 00:28:01 +0200
 
 mesa (7.10.2-1) unstable; urgency=low
diff --git a/debian/rules b/debian/rules
index 2f25d15..29760e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -209,10 +209,6 @@ build-stamp: $(BUILD_STAMPS)
 	rm -f build/dri/lib/gallium/i915_dri.so
 # r600g is not yet in a fit state to ship
 	rm -f build/dri/lib/gallium/r600_dri.so
-# Move nouveau_vieux alongside nouveau to install in dri-experimental package
-ifneq (,$(filter nouveau,$(DRI_DRIVERS)))
-	mv build/dri/lib/nouveau_vieux_dri.so build/dri/lib/gallium/
-endif
 	>$@
 
 $(STAMP)-build-%: configure
@@ -274,6 +270,11 @@ binary-arch: install
 	# install the right files manually.
 	rm -r debian/tmp/dri/usr/lib/dri
 
+	# Move nouveau_vieux alongside nouveau to install in dri-experimental package
+ifneq (,$(filter nouveau,$(DRI_DRIVERS)))
+	mv build/dri/lib/nouveau_vieux_dri.so build/dri/lib/gallium/
+endif
+
 	# Also get rid of other files which aren't installed. Do not
 	# use -f to ensure we notice disappearing files:
 	set -e; for file in $(NOT_INSTALLED); do rm debian/tmp/$$file; done

commit 08f984b9366f73269f64a503e3e935fbe1f0fb1a
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 2 00:30:40 2011 +0200

    Bump changelog.

diff --git a/debian/changelog b/debian/changelog
index 6487631..40658f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mesa (7.10.2-2) UNRELEASED; urgency=low
+
+  * Merge upstream 7.10 branch up to b8c6362389.
+
+ -- Cyril Brulebois <kibi@debian.org>  Mon, 02 May 2011 00:28:01 +0200
+
 mesa (7.10.2-1) unstable; urgency=low
 
   * New upstream release.

commit b8c6362389e56b7fbe72147727995ae45b12e2a0
Author: José Fonseca <jose.r.fonseca@gmail.com>
Date:   Sat Apr 30 22:36:18 2011 +0100

    mesa: GL_PROVOKING_VERTEX_EXT is a GLenum, not GLboolean.

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index d5eef49..b6d2a99 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1155,7 +1155,7 @@ static const struct value_desc values[] = {
 
    /* GL_EXT_provoking_vertex */
    { GL_PROVOKING_VERTEX_EXT,
-     CONTEXT_BOOL(Light.ProvokingVertex), extra_EXT_provoking_vertex },
+     CONTEXT_ENUM(Light.ProvokingVertex), extra_EXT_provoking_vertex },
    { GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT,
      CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention),
      extra_EXT_provoking_vertex },

commit 73f4273b8647abe0020ad3c2d593e009092d2be5
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Apr 21 17:26:39 2011 -0700

    glsl: Regenerate compiler and glcpp files from cherry picks

diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c
index 46e690d..78dd351 100644
--- a/src/glsl/glcpp/glcpp-parse.c
+++ b/src/glsl/glcpp/glcpp-parse.c
@@ -165,16 +165,16 @@ _token_list_append_list (token_list_t *list, token_list_t *tail);
 static int
 _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b);
 
-static active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker);
+static void
+_parser_active_list_push (glcpp_parser_t *parser,
+			  const char *identifier,
+			  token_node_t *marker);
 
-static active_list_t *
-_active_list_pop (active_list_t *list);
+static void
+_parser_active_list_pop (glcpp_parser_t *parser);
 
-int
-_active_list_contains (active_list_t *list, const char *identifier);
+static int
+_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier);
 
 static void
 _glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list);
@@ -3791,7 +3791,7 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
 
 	/* Finally, don't expand this macro if we're already actively
 	 * expanding it, (to avoid infinite recursion). */
-	if (_active_list_contains (parser->active, identifier)) {
+	if (_parser_active_list_contains (parser, identifier)) {
 		/* We change the token type here from IDENTIFIER to
 		 * OTHER to prevent any future expansion of this
 		 * unexpanded token. */
@@ -3821,51 +3821,53 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
 	return _glcpp_parser_expand_function (parser, node, last);
 }
 
-/* Push a new identifier onto the active list, returning the new list.
+/* Push a new identifier onto the parser's active list.
  *
  * Here, 'marker' is the token node that appears in the list after the
  * expansion of 'identifier'. That is, when the list iterator begins
- * examinging 'marker', then it is time to pop this node from the
+ * examining 'marker', then it is time to pop this node from the
  * active stack.
  */
-active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker)
+static void
+_parser_active_list_push (glcpp_parser_t *parser,
+			  const char *identifier,
+			  token_node_t *marker)
 {
 	active_list_t *node;
 
-	node = ralloc (list, active_list_t);
+	node = ralloc (parser->active, active_list_t);
 	node->identifier = ralloc_strdup (node, identifier);
 	node->marker = marker;
-	node->next = list;
+	node->next = parser->active;
 
-	return node;
+	parser->active = node;
 }
 
-active_list_t *
-_active_list_pop (active_list_t *list)
+static void
+_parser_active_list_pop (glcpp_parser_t *parser)
 {
-	active_list_t *node = list;
+	active_list_t *node = parser->active;
 
-	if (node == NULL)
-		return NULL;
+	if (node == NULL) {
+		parser->active = NULL;
+		return;
+	}
 
-	node = list->next;
-	ralloc_free (list);
+	node = parser->active->next;
+	ralloc_free (parser->active);
 
-	return node;
+	parser->active = node;
 }
 
-int
-_active_list_contains (active_list_t *list, const char *identifier)
+static int
+_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier)
 {
 	active_list_t *node;
 
-	if (list == NULL)
+	if (parser->active == NULL)
 		return 0;
 
-	for (node = list; node; node = node->next)
+	for (node = parser->active; node; node = node->next)
 		if (strcmp (node->identifier, identifier) == 0)
 			return 1;
 
@@ -3884,6 +3886,7 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 	token_node_t *node_prev;
 	token_node_t *node, *last = NULL;
 	token_list_t *expansion;
+	active_list_t *active_initial = parser->active;
 
 	if (list == NULL)
 		return;
@@ -3896,10 +3899,8 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 	while (node) {
 
 		while (parser->active && parser->active->marker == node)
-			parser->active = _active_list_pop (parser->active);
+			_parser_active_list_pop (parser);
 
-		/* Find the expansion for node, which will replace all
-		 * nodes from node to last, inclusive. */
 		expansion = _glcpp_parser_expand_node (parser, node, &last);
 		if (expansion) {
 			token_node_t *n;
@@ -3908,12 +3909,12 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 				while (parser->active &&
 				       parser->active->marker == n)
 				{
-					parser->active = _active_list_pop (parser->active);
+					_parser_active_list_pop (parser);
 				}
 
-			parser->active = _active_list_push (parser->active,
-							    node->token->value.str,
-							    last->next);
+			_parser_active_list_push (parser,
+						  node->token->value.str,
+						  last->next);
 			
 			/* Splice expansion into list, supporting a
 			 * simple deletion if the expansion is
@@ -3940,8 +3941,11 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 		node = node_prev ? node_prev->next : list->head;
 	}
 
-	while (parser->active)
-		parser->active = _active_list_pop (parser->active);
+	/* Remove any lingering effects of this invocation on the
+	 * active list. That is, pop until the list looks like it did
+	 * at the beginning of this function. */
+	while (parser->active && parser->active != active_initial)
+		_parser_active_list_pop (parser);
 
 	list->non_space_tail = list->tail;
 }

commit 6d35d0bda67d528dfca4897d57ec61f6839c9a6b
Author: Carl Worth <cworth@cworth.org>
Date:   Fri Apr 15 12:03:25 2011 -0700

    glcpp: Fix attempts to expand recursive macros infinitely (bug #32835).
    
    The 095-recursive-define test case was triggering infinite recursion
    with the following test case:
    
    	#define A(a, b) B(a, b)
    	#define C A(0, C)
    	C
    
    Here's what was happening:
    
      1. "C" was pushed onto the active list to expand the C node
    
      2. While expanding the "0" argument, the active list would be
         emptied by the code at the end of _glcpp_parser_expand_token_list
    
      3. When expanding the "C" argument, the active list was now empty,
         so lather, rinse, repeat.
    
    We fix this by adjusting the final popping at the end of
    _glcpp_parser_expand_token_list to never pop more nodes then this
    particular invocation had pushed itself. This is as simple as saving
    the original state of the active list, and then interrupting the
    popping when we reach this same state.
    
    With this fix, all of the glcpp-test tests now pass.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32835
    Signed-off-by: Carl Worth <cworth@cworth.org>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
    (cherry picked from commit 9dacbe222641443af000a82161922a5ade206340)

diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 5eed9c0..bf94592 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -1561,6 +1561,7 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 	token_node_t *node_prev;
 	token_node_t *node, *last = NULL;
 	token_list_t *expansion;
+	active_list_t *active_initial = parser->active;
 
 	if (list == NULL)
 		return;
@@ -1615,7 +1616,10 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 		node = node_prev ? node_prev->next : list->head;
 	}
 
-	while (parser->active)
+	/* Remove any lingering effects of this invocation on the
+	 * active list. That is, pop until the list looks like it did
+	 * at the beginning of this function. */
+	while (parser->active && parser->active != active_initial)
 		_parser_active_list_pop (parser);
 
 	list->non_space_tail = list->tail;

commit 29c2e1f3f7c0a76db97afb8adb64d2d98e57ca3b
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Apr 14 15:35:41 2011 -0700

    glcpp: Simplify calling convention of parser's active_list functions
    
    These were all written as generic list functions, (accepting and returning
    a list to act upon). But they were only ever used with parser->active as
    the list. By simply accepting the parser itself, these functions can update
    parser->active and now return nothing at all. This makes the code a bit
    more compact.
    
    And hopefully the code is no less readable since the functions are also
    now renamed to have "_parser_active" in the name for better correlation
    with nearby tests of the parser->active field.
    (cherry picked from commit 02d293c08ee2375fc43b343bfc9b074f33a9063c)

diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 7c51299..5eed9c0 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -95,16 +95,16 @@ _token_list_append_list (token_list_t *list, token_list_t *tail);
 static int
 _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b);
 
-static active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker);
+static void
+_parser_active_list_push (glcpp_parser_t *parser,
+			  const char *identifier,
+			  token_node_t *marker);
 
-static active_list_t *
-_active_list_pop (active_list_t *list);
+static void
+_parser_active_list_pop (glcpp_parser_t *parser);
 
-int
-_active_list_contains (active_list_t *list, const char *identifier);
+static int
+_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier);
 
 static void
 _glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list);
@@ -1466,7 +1466,7 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
 
 	/* Finally, don't expand this macro if we're already actively
 	 * expanding it, (to avoid infinite recursion). */
-	if (_active_list_contains (parser->active, identifier)) {
+	if (_parser_active_list_contains (parser, identifier)) {
 		/* We change the token type here from IDENTIFIER to
 		 * OTHER to prevent any future expansion of this
 		 * unexpanded token. */
@@ -1496,51 +1496,53 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
 	return _glcpp_parser_expand_function (parser, node, last);
 }
 
-/* Push a new identifier onto the active list, returning the new list.
+/* Push a new identifier onto the parser's active list.
  *
  * Here, 'marker' is the token node that appears in the list after the
  * expansion of 'identifier'. That is, when the list iterator begins
- * examinging 'marker', then it is time to pop this node from the
+ * examining 'marker', then it is time to pop this node from the
  * active stack.
  */
-active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker)
+static void
+_parser_active_list_push (glcpp_parser_t *parser,
+			  const char *identifier,
+			  token_node_t *marker)
 {
 	active_list_t *node;
 
-	node = ralloc (list, active_list_t);
+	node = ralloc (parser->active, active_list_t);
 	node->identifier = ralloc_strdup (node, identifier);
 	node->marker = marker;
-	node->next = list;
+	node->next = parser->active;
 
-	return node;
+	parser->active = node;
 }
 
-active_list_t *
-_active_list_pop (active_list_t *list)
+static void
+_parser_active_list_pop (glcpp_parser_t *parser)
 {
-	active_list_t *node = list;
+	active_list_t *node = parser->active;
 
-	if (node == NULL)
-		return NULL;
+	if (node == NULL) {
+		parser->active = NULL;
+		return;
+	}
 
-	node = list->next;
-	ralloc_free (list);
+	node = parser->active->next;
+	ralloc_free (parser->active);
 
-	return node;
+	parser->active = node;
 }
 
-int
-_active_list_contains (active_list_t *list, const char *identifier)
+static int
+_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier)
 {
 	active_list_t *node;
 
-	if (list == NULL)
+	if (parser->active == NULL)
 		return 0;
 
-	for (node = list; node; node = node->next)
+	for (node = parser->active; node; node = node->next)
 		if (strcmp (node->identifier, identifier) == 0)
 			return 1;
 
@@ -1571,10 +1573,8 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 	while (node) {
 
 		while (parser->active && parser->active->marker == node)
-			parser->active = _active_list_pop (parser->active);
+			_parser_active_list_pop (parser);
 
-		/* Find the expansion for node, which will replace all
-		 * nodes from node to last, inclusive. */
 		expansion = _glcpp_parser_expand_node (parser, node, &last);
 		if (expansion) {
 			token_node_t *n;
@@ -1583,12 +1583,12 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 				while (parser->active &&
 				       parser->active->marker == n)
 				{
-					parser->active = _active_list_pop (parser->active);
+					_parser_active_list_pop (parser);
 				}
 
-			parser->active = _active_list_push (parser->active,
-							    node->token->value.str,
-							    last->next);
+			_parser_active_list_push (parser,
+						  node->token->value.str,
+						  last->next);
 			
 			/* Splice expansion into list, supporting a
 			 * simple deletion if the expansion is
@@ -1616,7 +1616,7 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
 	}
 
 	while (parser->active)
-		parser->active = _active_list_pop (parser->active);
+		_parser_active_list_pop (parser);
 
 	list->non_space_tail = list->tail;
 }

commit dca5ddf4718cf05858c9da5cc29417228cf8ca73
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Apr 12 15:42:06 2011 -0700

    i965: Allocate the whole URB to the VS and fix calculations for Gen6.
    
    Since we never enable the GS on Sandybridge, there's no need to allocate
    it any URB space.
    
    Furthermore, the previous calculation was incorrect: it neglected to
    multiply by nr_vs_entries, instead comparing whether twice the size of
    a single VS URB entry was bigger than the entire URB space.  It also
    neglected to take into account that vs_size is in units of 128 byte
    blocks, while urb_size is in bytes.
    
    Despite the above problems, the calculations resulted in an acceptable
    programming of the URB in most cases, at least on GT2.
    
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    
    (cherry picked from commit 42a805700039e81a9245f46f153e2cd9705cd0d7)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index a74ba5c..230d326 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -182,7 +182,6 @@ GLboolean brwCreateContext( int api,
 
    /* WM maximum threads is number of EUs times number of threads per EU. */
    if (intel->gen >= 6) {
-      brw->urb.size = 1024;
       if (IS_GT2(intel->intelScreen->deviceID)) {
 	 /* This could possibly be 80, but is supposed to require
 	  * disabling of WIZ hashing (bit 6 of GT_MODE, 0x20d0) and a
@@ -190,9 +189,13 @@ GLboolean brwCreateContext( int api,
 	  */
 	 brw->wm_max_threads = 40;
 	 brw->vs_max_threads = 60;
+	 brw->urb.size = 64;            /* volume 5c.5 section 5.1 */
+	 brw->urb.max_vs_handles = 128; /* volume 2a (see 3DSTATE_URB) */
       } else {
 	 brw->wm_max_threads = 40;
 	 brw->vs_max_threads = 24;
+	 brw->urb.size = 32;            /* volume 5c.5 section 5.1 */
+	 brw->urb.max_vs_handles = 256; /* volume 2a (see 3DSTATE_URB) */
       }
    } else if (intel->gen == 5) {
       brw->urb.size = 1024;
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 7069724..083e79f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -549,6 +549,9 @@ struct brw_context
 
       GLboolean constrained;
 
+      GLuint max_vs_handles;	/* Maximum number of VS handles */
+      GLuint max_gs_handles;	/* Maximum number of GS handles */
+
       GLuint nr_vs_entries;
       GLuint nr_gs_entries;
       GLuint nr_clip_entries;
@@ -557,10 +560,7 @@ struct brw_context
 
       /* gen6 */
       GLuint vs_size;
-/*       GLuint gs_size; */
-/*       GLuint clip_size; */
-/*       GLuint sf_size; */
-/*       GLuint cs_size; */
+      GLuint gs_size;
 
       GLuint vs_start;
       GLuint gs_start;
diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c
index de97fd3..91d7b01 100644
--- a/src/mesa/drivers/dri/i965/gen6_urb.c
+++ b/src/mesa/drivers/dri/i965/gen6_urb.c
@@ -34,19 +34,25 @@
 static void
 prepare_urb( struct brw_context *brw )
 {
-   brw->urb.nr_vs_entries = 24;
-   if (brw->gs.prog_bo)
-      brw->urb.nr_gs_entries = 4;
-   else
-      brw->urb.nr_gs_entries = 0;
+   int nr_vs_entries;
+
    /* CACHE_NEW_VS_PROG */
    brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1);
 
-   /* Check that the number of URB rows (8 floats each) allocated is less
-    * than the URB space.
+   /* Calculate how many VS URB entries fit in the total URB size */
+   nr_vs_entries = (brw->urb.size * 1024) / (brw->urb.vs_size * 128);
+
+   if (nr_vs_entries > brw->urb.max_vs_handles)
+      nr_vs_entries = brw->urb.max_vs_handles;
+
+   /* According to volume 2a, nr_vs_entries must be a multiple of 4. */
+   brw->urb.nr_vs_entries = ROUND_DOWN_TO(nr_vs_entries, 4);
+
+   /* Since we currently don't support Geometry Shaders, we always put the
+    * GS unit in passthrough mode and don't allocate it any URB space.
     */
-   assert((brw->urb.nr_vs_entries +
-	   brw->urb.nr_gs_entries) * brw->urb.vs_size * 8 < 64 * 1024);
+   brw->urb.nr_gs_entries = 0;
+   brw->urb.gs_size = 1; /* Incorrect, but with 0 GS entries it doesn't matter. */
 }
 
 static void
@@ -54,6 +60,7 @@ upload_urb(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
 
+   assert(brw->urb.nr_vs_entries >= 24);
    assert(brw->urb.nr_vs_entries % 4 == 0);
    assert(brw->urb.nr_gs_entries % 4 == 0);
    /* GS requirement */
@@ -63,7 +70,7 @@ upload_urb(struct brw_context *brw)
    OUT_BATCH(CMD_URB << 16 | (3 - 2));
    OUT_BATCH(((brw->urb.vs_size - 1) << GEN6_URB_VS_SIZE_SHIFT) |
 	     ((brw->urb.nr_vs_entries) << GEN6_URB_VS_ENTRIES_SHIFT));
-   OUT_BATCH(((brw->urb.vs_size - 1) << GEN6_URB_GS_SIZE_SHIFT) |
+   OUT_BATCH(((brw->urb.gs_size - 1) << GEN6_URB_GS_SIZE_SHIFT) |
 	     ((brw->urb.nr_gs_entries) << GEN6_URB_GS_ENTRIES_SHIFT));
    ADVANCE_BATCH();
 }

commit ff77a69ae33f04b2fbfdc9a228214ef373d54f61
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Fri Apr 8 16:31:22 2011 -0700

    intel: Fix ROUND_DOWN_TO macro
    
    Previously the macro would (ALIGN(value - alignment - 1, alignment)).
    At the very least, this was missing parenthesis around "alignment -
    1".  As a result, if value was already aligned, it would be reduced by
    alignment.  Condisder:
    
         x = ROUND_DOWN_TO(256, 128);
    
    This becomes:
    
        x = ALIGN(256 - 128 - 1, 128);
    
    Or:
    
        x = ALIGN(127, 128);
    
    Which becomes:
    
        x = 128;
    
    This macro is currently only used in brw_state_batch


Reply to: