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

mesa: Changes to 'debian-unstable'



 Makefile                                  |    2 
 configs/default                           |    2 
 configure.ac                              |    7 --
 debian/changelog                          |    5 +
 debian/patches/04_osmesa_version.diff     |   15 ----
 debian/patches/06_kfreebsd-ftbfs.diff     |    9 +-
 docs/download.html                        |    4 -
 docs/news.html                            |   22 +++++++
 docs/relnotes-7.4.2.html                  |   16 ++++-
 docs/relnotes-7.4.3.html                  |   79 +++++++++++++++++++++++++
 docs/relnotes-7.4.4.html                  |   59 ++++++++++++++++++
 docs/relnotes.html                        |    9 --
 progs/glsl/multitex.c                     |   17 +++++
 src/glx/x11/dri_glx.c                     |    2 
 src/glx/x11/drisw_glx.c                   |    4 -
 src/glx/x11/glxcurrent.c                  |    2 
 src/mesa/drivers/dri/common/dri_util.c    |    6 +
 src/mesa/drivers/dri/i965/brw_sf_state.c  |   13 ++--
 src/mesa/drivers/dri/intel/intel_fbo.c    |    3 
 src/mesa/drivers/dri/intel/intel_screen.c |   24 +++++++
 src/mesa/drivers/osmesa/Makefile          |   36 ++---------
 src/mesa/drivers/x11/fakeglx.c            |    2 
 src/mesa/main/context.c                   |   41 +++++++++----
 src/mesa/main/context.h                   |    3 
 src/mesa/main/fbobject.c                  |   16 ++++-
 src/mesa/main/get.c                       |   12 +++
 src/mesa/main/get_gen.py                  |    5 +
 src/mesa/main/image.c                     |   36 +++++++----
 src/mesa/main/matrix.c                    |    4 -
 src/mesa/main/mtypes.h                    |    2 
 src/mesa/main/state.c                     |    2 
 src/mesa/main/texrender.c                 |    1 
 src/mesa/main/texstate.c                  |    6 +
 src/mesa/main/version.h                   |    7 +-
 src/mesa/shader/slang/slang_link.c        |    5 +
 src/mesa/shader/slang/slang_preprocess.c  |   94 ++++++++++++++++++++++++++++--
 src/mesa/swrast/s_texfilter.c             |    2 
 src/mesa/vbo/vbo_exec_array.c             |    5 +
 src/mesa/vbo/vbo_exec_draw.c              |    1 
 39 files changed, 460 insertions(+), 120 deletions(-)

New commits:
commit ec4c889266934372b158bf54cddb8ea99c82ad8b
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Jun 24 12:37:17 2009 +0200

    Update 04_osmesa_version.diff, refresh 06_kfreebsd-ftbfs.diff.

diff --git a/debian/changelog b/debian/changelog
index 862d9a3..763ac1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ mesa (7.4.4-1) UNRELEASED; urgency=low
   * New upstream release.
     + fixes a crash in swrast glXWaitX (closes: #528708)
   * Don't build hardware dri drivers on s390.
+  * Update 04_osmesa_version.diff, refresh 06_kfreebsd-ftbfs.diff.
 
   [ Brice Goglin ]
   * Enable motif in GLw, closes: #527483.
diff --git a/debian/patches/04_osmesa_version.diff b/debian/patches/04_osmesa_version.diff
index 108916c..68c3db0 100644
--- a/debian/patches/04_osmesa_version.diff
+++ b/debian/patches/04_osmesa_version.diff
@@ -2,18 +2,9 @@ Index: mesa/src/mesa/drivers/osmesa/Makefile
 ===================================================================
 --- mesa.orig/src/mesa/drivers/osmesa/Makefile
 +++ mesa/src/mesa/drivers/osmesa/Makefile
-@@ -45,7 +45,7 @@
- 
- $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS)
- 	$(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
--		-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-+		-major 6 -minor 5 -patch 3 \
- 		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- 		-id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
- 		$(OSMESA_LIB_DEPS) $(OBJECTS)
-@@ -57,7 +57,7 @@
- # with all the other Mesa sources (compiled with -DCHAN_BITS=16/32
- osmesa16: $(OBJECTS) $(CORE_MESA)
+@@ -39,7 +39,7 @@
+ # -DCHAN_BITS=16/32.
+ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA)
  	$(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
 -		-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
 +		-major 6 -minor 5 -patch 3 \
diff --git a/debian/patches/06_kfreebsd-ftbfs.diff b/debian/patches/06_kfreebsd-ftbfs.diff
index ee78b28..104967a 100644
--- a/debian/patches/06_kfreebsd-ftbfs.diff
+++ b/debian/patches/06_kfreebsd-ftbfs.diff
@@ -4,9 +4,11 @@ mesa fails to build on GNU/kFreeBSD, since some parts are not enabled.
     
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524690
 
---- mesa-7.4.orig/configure.ac
-+++ mesa-7.4/configure.ac
-@@ -680,7 +680,7 @@
+Index: mesa/configure.ac
+===================================================================
+--- mesa.orig/configure.ac
++++ mesa/configure.ac
+@@ -683,7 +683,7 @@
              ;;
          esac
          ;;
@@ -14,3 +16,4 @@ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524690
 +    freebsd* | dragonfly* | kfreebsd*-gnu*)
          DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
          DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
+         DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"

commit c84a384fdfdbaae61d91f9ba632b1df391dc28af
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Jun 24 12:27:52 2009 +0200

    Update changelog

diff --git a/debian/changelog b/debian/changelog
index 6cfe95a..862d9a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
-mesa (7.4.1-2) UNRELEASED; urgency=low
+mesa (7.4.4-1) UNRELEASED; urgency=low
 
   [ Julien Cristau ]
+  * New upstream release.
+    + fixes a crash in swrast glXWaitX (closes: #528708)
   * Don't build hardware dri drivers on s390.
 
   [ Brice Goglin ]

commit d0c391b6a22f8c10b156afd476568ad55a68a53c
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Jun 23 18:53:31 2009 -0600

    docs: set 7.4.4 release date

diff --git a/docs/news.html b/docs/news.html
index 9b16709..ee4a86c 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,6 +11,14 @@
 <H1>News</H1>
 
 
+<h2>June 23, 2009</h2>
+<p>
+<a href="relnotes-7.4.4.html">Mesa 7.4.4</a> is released.
+This is a stable release that fixes a regression in the i915/i965 drivers
+that slipped into the 7.4.3 release.
+</p>
+
+
 <h2>June 19, 2009</h2>
 <p>
 <a href="relnotes-7.4.3.html">Mesa 7.4.3</a> is released.
diff --git a/docs/relnotes-7.4.4.html b/docs/relnotes-7.4.4.html
index aacbbac..c54692b 100644
--- a/docs/relnotes-7.4.4.html
+++ b/docs/relnotes-7.4.4.html
@@ -8,7 +8,7 @@
 
 <body bgcolor="#eeeeee">
 
-<H1>Mesa 7.4.4 Release Notes / 19 June 2009</H1>
+<H1>Mesa 7.4.4 Release Notes / 23 June 2009</H1>
 
 <p>
 Mesa 7.4.4 is a stable development release fixing bugs since the 7.4.3 release.

commit eaed8dc6093fcc722c6ec318c73968b3f2da1833
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 22 15:27:03 2009 -0600

    mesa: bump version to 7.4.4

diff --git a/Makefile b/Makefile
index 96f5089..9a8456f 100644
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,7 @@ ultrix-gcc:
 
 # Rules for making release tarballs
 
-VERSION=7.4.3
+VERSION=7.4.4
 DIRECTORY = Mesa-$(VERSION)
 LIB_NAME = MesaLib-$(VERSION)
 DEMO_NAME = MesaDemos-$(VERSION)
diff --git a/configs/default b/configs/default
index a45d2d4..0f8337b 100644
--- a/configs/default
+++ b/configs/default
@@ -10,7 +10,7 @@ CONFIG_NAME = default
 # Version info
 MESA_MAJOR=7
 MESA_MINOR=4
-MESA_TINY=2
+MESA_TINY=4
 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
 
 # external projects.  This should be useless now that we use libdrm.
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 29b39e3..f52f5c6 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.4.3
+ * Version:  7.4.4
  *
  * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
  * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
@@ -31,8 +31,8 @@
 /* Mesa version */
 #define MESA_MAJOR 7
 #define MESA_MINOR 4
-#define MESA_PATCH 3
-#define MESA_VERSION_STRING "7.4.3"
+#define MESA_PATCH 4
+#define MESA_VERSION_STRING "7.4.4"
 
 /* To make version comparison easy */
 #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

commit b5609e64447859041f17722ee016babd517d52b9
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 22 15:26:19 2009 -0600

    docs: release notes for 7.4.4

diff --git a/docs/relnotes-7.4.4.html b/docs/relnotes-7.4.4.html
new file mode 100644
index 0000000..aacbbac
--- /dev/null
+++ b/docs/relnotes-7.4.4.html
@@ -0,0 +1,59 @@
+<HTML>
+
+<TITLE>Mesa Release Notes</TITLE>
+
+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.4.4 Release Notes / 19 June 2009</H1>
+
+<p>
+Mesa 7.4.4 is a stable development release fixing bugs since the 7.4.3 release.
+</p>
+<p>
+Mesa 7.4.4 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+</pre>
+
+
+<h2>Bug fixes</h2>
+<ul>
+<li>Fixed i965/i915 segfault in screen destruction (bug 22408)
+</ul>
+
+
+
+<h2>Driver Status</h2>
+
+<pre>
+Driver			Status
+----------------------	----------------------
+DRI drivers		varies with the driver
+XMesa/GLX (on Xlib)	implements OpenGL 2.1
+OSMesa (off-screen)	implements OpenGL 2.1
+Windows/Win32		implements OpenGL 2.1
+Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
+SVGA			unsupported
+Wind River UGL		unsupported
+DJGPP			unsupported
+GGI			unsupported
+BeOS			unsupported
+Allegro			unsupported
+D3D			unsupported
+</pre>
+
+</body>
+</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index 520ba45..2dbd802 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -9,17 +9,11 @@
 <H1>Release Notes</H1>
 
 <p>
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.5) designate new developmental releases.
-Even numbered versions (such as 6.4) designate stable releases.
-</p>
-
-
-<p>
 The release notes summarize what's new or changed in each Mesa release.
 </p>
 
 <UL>
+<LI><A HREF="relnotes-7.4.4.html">7.4.4 release notes</A>
 <LI><A HREF="relnotes-7.4.3.html">7.4.3 release notes</A>
 <LI><A HREF="relnotes-7.4.2.html">7.4.2 release notes</A>
 <LI><A HREF="relnotes-7.4.1.html">7.4.1 release notes</A>

commit 0b870bbb2a9eed11614f55949086c8f805ee6fe1
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 22 11:14:10 2009 -0600

    docs: 7.4.3 MD5 checksums

diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
index d1d0a47..35b5dcc 100644
--- a/docs/relnotes-7.4.3.html
+++ b/docs/relnotes-7.4.3.html
@@ -26,6 +26,15 @@ for DRI hardware acceleration.
 
 <h2>MD5 checksums</h2>
 <pre>
+34c5a6c47ed51f31c4fa36e269831352  MesaLib-7.4.3.tar.gz
+70a983ba3deaa8bd63b18bbab283f698  MesaLib-7.4.3.tar.bz2
+34f21b3205b271d575030aa98a2dda51  MesaLib-7.4.3.zip
+56752b7adede212e6097afb10d0c0d59  MesaDemos-7.4.3.tar.gz
+8ffa51c4833b1e298300a005e2d7ca2a  MesaDemos-7.4.3.tar.bz2
+0037d24d41400d6fb9800ae55b8c863f  MesaDemos-7.4.3.zip
+20e24f6692c0c90e7e3b220f79c4108d  MesaGLUT-7.4.3.tar.gz
+03a4beeef74fc5ef0b1d6d04710e5a8a  MesaGLUT-7.4.3.tar.bz2
+273788230adbdb9d57371309adedcf5f  MesaGLUT-7.4.3.zip
 </pre>
 
 

commit 1dbbc39f48ce5f9aa63ab42930b14e48938b326f
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 22 11:23:30 2009 -0600

    intel: added a null ptr check
    
    This was hit during screen tear-down.

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 54f6038..5a1314e 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -345,7 +345,8 @@ intel_renderbuffer_set_region(struct intel_renderbuffer *rb,
    intel_region_reference(&rb->region, region);
    intel_region_release(&old);
 
-   rb->pfPitch = region->pitch;
+   if (region)
+      rb->pfPitch = region->pitch;
 }
 
 /**

commit 4b8cd0b0ad48c3b0129451924f7461ffcbbc8597
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 22 11:23:13 2009 -0600

    intel: call _mesa_unreference_framebuffer() in intelDestroyBuffer()
    
    This was a call to _mesa_reference_framebuffer(ptr, NULL) but the NULL
    pointer is incorrect in Mesa 7.4.x.
    
    Fixes a failed assertion during screen tear-down.

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 59fa54f..8d2a3a7 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -409,7 +409,7 @@ intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv)
       }
    }
 
-   _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+   _mesa_unreference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)));
 }
 
 

commit 5d387a35ffc8fc7e4fad5fbe92b653edd536585d
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Jun 19 15:16:01 2009 -0600

    docs: set 7.4.3 release date

diff --git a/docs/news.html b/docs/news.html
index 79e2980..9b16709 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,7 +11,7 @@
 <H1>News</H1>
 
 
-<h2>(TBD) 2009</h2>
+<h2>June 19, 2009</h2>
 <p>
 <a href="relnotes-7.4.3.html">Mesa 7.4.3</a> is released.
 This is a stable release fixing bugs since the 7.4.2 release.
diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
index 6ada3ff..d1d0a47 100644
--- a/docs/relnotes-7.4.3.html
+++ b/docs/relnotes-7.4.3.html
@@ -8,7 +8,7 @@
 
 <body bgcolor="#eeeeee">
 
-<H1>Mesa 7.4.3 Release Notes / date TBD</H1>
+<H1>Mesa 7.4.3 Release Notes / 19 June 2009</H1>
 
 <p>
 Mesa 7.4.3 is a stable development release fixing bugs since the 7.4.2 release.
@@ -41,7 +41,7 @@ for DRI hardware acceleration.
 <li>Fixed some GLSL preprocessor bugs
 <li>Fixed framebuffer mem leak in i945/i965 DRI drivers
 <li>Fixed texture coordinate repeat bug in swrast (bug 21872)
-<li>Fixed incorrect viewport clamping (lower bounds is zero, not one)
+<li>Fixed incorrect viewport clamping (lower bound is zero, not one)
 <li>GLX fix for glean's makeCurrent test case
 </ul>
 

commit 2ae6859215f9372793d6be29451324b9a6c80e87
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Jun 19 15:14:49 2009 -0600

    docs: bump version to 7.4.3

diff --git a/docs/download.html b/docs/download.html
index 1aa3e77..f3f8fd2 100644
--- a/docs/download.html
+++ b/docs/download.html
@@ -9,9 +9,7 @@
 <H1>Downloading</H1>
 
 <p>
-Current stable release: <b>7.4.2</b>
-<br>
-Last unstable/development release: <b>7.3</b>
+Current stable release: <b>7.4.3</b>
 </p>
 
 <p>

commit afe0ca1f3fdf024bb6aea6242a11cd24a1b0bb51
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 17 08:43:17 2009 -0600

    mesa: rework viewport/scissor initialization code
    
    The first time a context is bound to a drawable, the viewport and scissor
    bounds are initialized to the buffer's size.  This is actually a bit tricky.
    
    A new _mesa_check_init_viewport() function is called in several places
    to check if the viewport has been initialized.  We also use a new
    ctx->ViewportInitialized flag instead of the overloaded
    ctx->FirstTimeCurrent flag.
    
    Hand-picked from mesa_7_5_branch, commit 3f856c6b6b7fa95ef97a8712876de88d7d57932e

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 89a4383..e142c85 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1550,6 +1550,24 @@ initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
 
 
 /**
+ * Check if the viewport/scissor size has not yet been initialized.
+ * Initialize the size if the given width and height are non-zero.
+ */
+void
+_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height)
+{
+   if (!ctx->ViewportInitialized && width > 0 && height > 0) {
+      /* Note: set flag here, before calling _mesa_set_viewport(), to prevent
+       * potential infinite recursion.
+       */
+      ctx->ViewportInitialized = GL_TRUE;
+      _mesa_set_viewport(ctx, 0, 0, width, height);
+      _mesa_set_scissor(ctx, 0, 0, width, height);
+   }
+}
+
+
+/**
  * Bind the given context to the given drawBuffer and readBuffer and
  * make it the current context for the calling thread.
  * We'll render into the drawBuffer and read pixels from the
@@ -1651,25 +1669,24 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
          ASSERT(drawBuffer->Height > 0);
 #endif
 
-         if (newCtx->FirstTimeCurrent) {
-            /* set initial viewport and scissor size now */
-            _mesa_set_viewport(newCtx, 0, 0,
-                               drawBuffer->Width, drawBuffer->Height);
-	    _mesa_set_scissor(newCtx, 0, 0,
-			      drawBuffer->Width, drawBuffer->Height );
-            check_context_limits(newCtx);
+         if (drawBuffer) {
+            _mesa_check_init_viewport(newCtx,
+                                      drawBuffer->Width, drawBuffer->Height);
          }
       }
 
-      /* We can use this to help debug user's problems.  Tell them to set
-       * the MESA_INFO env variable before running their app.  Then the
-       * first time each context is made current we'll print some useful
-       * information.
-       */
       if (newCtx->FirstTimeCurrent) {
+         check_context_limits(newCtx);
+
+         /* We can use this to help debug user's problems.  Tell them to set
+          * the MESA_INFO env variable before running their app.  Then the
+          * first time each context is made current we'll print some useful
+          * information.
+          */
 	 if (_mesa_getenv("MESA_INFO")) {
 	    _mesa_print_info();
 	 }
+
 	 newCtx->FirstTimeCurrent = GL_FALSE;
       }
    }
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 54f1af9..8c1196d 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -132,6 +132,9 @@ extern void
 _mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
                     GLframebuffer *readBuffer );
 
+extern void
+_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height);
+
 extern GLboolean
 _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare);
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a9eb248..f5826ca 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3063,6 +3063,8 @@ struct __GLcontextRec
    GLenum RenderMode;        /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
    GLbitfield NewState;      /**< bitwise-or of _NEW_* flags */
 
+   GLboolean ViewportInitialized;  /**< has viewport size been initialized? */
+
    /** \name Derived state */
    /*@{*/
    /** Bitwise-or of DD_* flags.  Note that this bitfield may be used before

commit 6b782231d097f000b8e71c0a0a23a89176d7c3a2
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 17 08:40:16 2009 -0600

    mesa: added null ptr check in Fake_glXCreatePixmap()
    
    Fixes segfault in progs/xdemos/glxgears_pixmap.c
    
    (cherry picked from master, commit d18c57aaeac37cde0cb551191ecd3c3a56a0ffba)

diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 73fde86..09b23a1 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -2218,7 +2218,7 @@ Fake_glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap,
    if (!dpy || !config || !pixmap)
       return 0;
 
-   for (attr = attribList; *attr; attr++) {
+   for (attr = attribList; attr && *attr; attr++) {
       switch (*attr) {
       case GLX_TEXTURE_FORMAT_EXT:
          attr++;

commit 2b890c98184c3c21073c327e7dc36c3239169028
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 17 08:06:50 2009 -0600

    docs: document GLX/glean makeCurrent fix

diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
index 0d264e3..6ada3ff 100644
--- a/docs/relnotes-7.4.3.html
+++ b/docs/relnotes-7.4.3.html
@@ -42,6 +42,7 @@ for DRI hardware acceleration.
 <li>Fixed framebuffer mem leak in i945/i965 DRI drivers
 <li>Fixed texture coordinate repeat bug in swrast (bug 21872)
 <li>Fixed incorrect viewport clamping (lower bounds is zero, not one)
+<li>GLX fix for glean's makeCurrent test case
 </ul>
 
 

commit e0b13e15f1fb3b64297a9110fa5f867c7455681f
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 17 08:05:54 2009 -0600

    GLX: attempt to fix glean makeCurrent test cases.
    
    Two parts to this:
    
    One we don't keep pointers to possibly freed memory anymore once we unbind the
    drawables from the context. Brian I need to figure out what the comment
    you made there, can we get a glean/piglit test so we can fix it properly?
    
    If the new gc is the same as the oldGC, we call the unbind even though
    we just bound it in that function. doh.
    
    (cherry picked from master, commit 77506dac8e81e9548a7e9680ce367175fe5747af)

diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c
index 4d0a7c6..5434d33 100644
--- a/src/glx/x11/glxcurrent.c
+++ b/src/glx/x11/glxcurrent.c
@@ -429,7 +429,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
                                     &dummy_reply);
    }
 #ifdef GLX_DIRECT_RENDERING
-   else if (oldGC->driContext) {
+   else if (oldGC->driContext && oldGC != gc) {
       oldGC->driContext->unbindContext(oldGC->driContext);
    }
 #endif
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index ae79055..80c7aaf 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -119,6 +119,9 @@ static int driUnbindContext(__DRIcontext *pcp)
     pdp = pcp->driDrawablePriv;
     prp = pcp->driReadablePriv;
 
+    /* already unbound */
+    if (!pdp && !prp)
+      return GL_TRUE;
     /* Let driver unbind drawable from context */
     (*psp->DriverAPI.UnbindContext)(pcp);
 
@@ -143,9 +146,10 @@ static int driUnbindContext(__DRIcontext *pcp)
      * window we can determine the last context bound to the window and
      * use that context's lock. (BrianP, 2-Dec-2000)
      */
+    pcp->driDrawablePriv = pcp->driReadablePriv = NULL;
+
 #if 0
     /* Unbind the drawable */
-    pcp->driDrawablePriv = NULL;
     pdp->driContextPriv = &psp->dummyContextPriv;
 #endif
 

commit 420c74b870eeb87457a993c4b5034efa4b36857f
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Jun 16 09:40:22 2009 -0600

    docs: document viewport clamping bug

diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
index 64eeb1b..0d264e3 100644
--- a/docs/relnotes-7.4.3.html
+++ b/docs/relnotes-7.4.3.html
@@ -41,6 +41,7 @@ for DRI hardware acceleration.
 <li>Fixed some GLSL preprocessor bugs
 <li>Fixed framebuffer mem leak in i945/i965 DRI drivers
 <li>Fixed texture coordinate repeat bug in swrast (bug 21872)
+<li>Fixed incorrect viewport clamping (lower bounds is zero, not one)
 </ul>
 
 

commit a64f994a3a04a0414b4124a4d33a3bb91946c127
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Jun 16 09:39:33 2009 -0600

    mesa: fix incorrect viewport clamping in _mesa_set_viewport()
    
    A 0 by 0 viewport size is legal.  Don't clamp against lower bound of one.
    The error checking earlier in the function prevents negative values.

diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 0f96f94..7cfa2dd 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -580,8 +580,8 @@ _mesa_set_viewport( GLcontext *ctx, GLint x, GLint y,
    }
 
    /* clamp width and height to the implementation dependent range */
-   width  = CLAMP(width,  1, (GLsizei) ctx->Const.MaxViewportWidth);
-   height = CLAMP(height, 1, (GLsizei) ctx->Const.MaxViewportHeight);
+   width  = MIN2(width, (GLsizei) ctx->Const.MaxViewportWidth);
+   height = MIN2(height, (GLsizei) ctx->Const.MaxViewportHeight);
 
    ctx->Viewport.X = x;
    ctx->Viewport.Width = width;

commit c568446dc6d86c34692e11b179835376a1d4684d
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Jun 16 08:48:26 2009 -0600

    docs: fixed bug 21872

diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
index 640c000..64eeb1b 100644
--- a/docs/relnotes-7.4.3.html
+++ b/docs/relnotes-7.4.3.html
@@ -40,6 +40,7 @@ for DRI hardware acceleration.
 <li>Fixed broken glTexImage3D() when image type = GL_BITMAP
 <li>Fixed some GLSL preprocessor bugs
 <li>Fixed framebuffer mem leak in i945/i965 DRI drivers
+<li>Fixed texture coordinate repeat bug in swrast (bug 21872)
 </ul>
 
 

commit acbf9c6f3c569c044dec2fd2b963ed80fe33af25
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Jun 16 08:48:12 2009 -0600

    mesa: fix REMAINDER() macro
    
    The results were incorrect for some negative values of A.
    See bug 21872.
    
    (cherry picked from mesa_7_5_branch, commit ed7f4b42307bff4633689d6781cd3643f10041e5)

diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index fce0bcf..f86dbdb 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -226,7 +226,7 @@ lerp_rgba_3d(GLchan result[4], GLfloat a, GLfloat b, GLfloat c,
  * If A is a signed integer, A % B doesn't give the right value for A < 0
  * (in terms of texture repeat).  Just casting to unsigned fixes that.
  */
-#define REMAINDER(A, B) ((unsigned) (A) % (unsigned) (B))
+#define REMAINDER(A, B) (((A) + (B) * 1024) % (B))
 
 
 /**

commit 3b842feead88827a3c4f1ecafab72db96a2ac997
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 15 16:24:03 2009 -0600

    docs: recent fixes for 7.4.3

diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
index 4e5912a..640c000 100644
--- a/docs/relnotes-7.4.3.html
+++ b/docs/relnotes-7.4.3.html
@@ -38,6 +38,8 @@ for DRI hardware acceleration.
 <li>Fixed some OSMesa build issues
 <li>Fixed a vertex buffer object crash
 <li>Fixed broken glTexImage3D() when image type = GL_BITMAP
+<li>Fixed some GLSL preprocessor bugs
+<li>Fixed framebuffer mem leak in i945/i965 DRI drivers
 </ul>
 
 

commit 6d62b8d5c19d69abe8925aff76705363f6b7ce33
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jun 15 16:22:54 2009 -0600

    intel: Release fb backing regions in intelDestroyBuffer()
    
    Fixes memory leak when destroying framebuffers.
    
    (cherry picked from mesa_7_5_branch, commit d027e8feff7d38cccadc6aaccc0454b21ce4dca0)

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 4bd11dd..59fa54f 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -385,7 +385,31 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
 static void
 intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv)
 {
-   _mesa_unreference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)));
+   struct intel_framebuffer *intel_fb = driDrawPriv->driverPrivate;
+   struct intel_renderbuffer *depth_rb;
+   struct intel_renderbuffer *stencil_rb;
+
+   if (intel_fb) {
+      if (intel_fb->color_rb[0]) {
+         intel_renderbuffer_set_region(intel_fb->color_rb[0], NULL);
+      }
+
+      if (intel_fb->color_rb[1]) {
+         intel_renderbuffer_set_region(intel_fb->color_rb[1], NULL);
+      }
+
+      depth_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
+      if (depth_rb) {
+         intel_renderbuffer_set_region(depth_rb, NULL);
+      }
+
+      stencil_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
+      if (stencil_rb) {
+         intel_renderbuffer_set_region(stencil_rb, NULL);
+      }
+   }
+
+   _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
 }
 
 

commit 02659868e888f8575ed4a3f6f0d269a7bbe2c5c2
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 10 12:26:12 2009 -0600

    glsl: fix warnings, update comments, s/TRUE/GL_TRUE/
    
    (cherry picked from master, commit 7fdd64ab29576e607434fb8c82ddfa61e8ea6aa8)

diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 6953616..e03a70f 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -1306,14 +1306,15 @@ error:
 }
 
 
-/*
+/**
  * Remove the continuation characters from the input string.
  * This is the very first step in preprocessing and is effective
  * even inside comment blocks.
  * If there is a whitespace between a backslash and a newline,
  * this is not considered as a line continuation.
+ * \return GL_TRUE for success, GL_FALSE otherwise.
  */
-GLboolean
+static GLboolean
 _slang_preprocess_backslashes(slang_string *output,
                               const char *input)
 {
@@ -1340,7 +1341,7 @@ _slang_preprocess_backslashes(slang_string *output,
          slang_string_pushc(output, *input++);
       }
    }
-   return TRUE;
+   return GL_TRUE;
 }
 
 

commit 457f4efab04b6eb57ceca0b9dec23042f7503ba5
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 10 12:25:35 2009 -0600

    glsl: Handle continuation characters in preprocessor.
    
    (cherry picked from master, commit cc22620e4b11425997f3bc1fc70f4c88cec22d2e)

diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 5455ba6..6953616 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -1306,6 +1306,44 @@ error:
 }
 
 
+/*
+ * Remove the continuation characters from the input string.
+ * This is the very first step in preprocessing and is effective
+ * even inside comment blocks.
+ * If there is a whitespace between a backslash and a newline,
+ * this is not considered as a line continuation.
+ */
+GLboolean
+_slang_preprocess_backslashes(slang_string *output,
+                              const char *input)
+{
+   while (*input) {
+      if (input[0] == '\\') {
+         /* If a newline follows, eat the backslash and the newline. */
+         if (input[1] == '\r') {
+            if (input[2] == '\n') {
+               input += 3;
+            } else {
+               input += 2;
+            }
+         } else if (input[1] == '\n') {
+            if (input[2] == '\r') {
+               input += 3;
+            } else {
+               input += 2;
+            }
+         } else {
+            /* Leave the backslash alone. */
+            slang_string_pushc(output, *input++);
+         }
+      } else {
+         slang_string_pushc(output, *input++);
+      }
+   }
+   return TRUE;
+}
+
+
 /**
  * Run preprocessor on source code.
  * \param extensions  indicates which GL extensions are enabled
@@ -1323,6 +1361,7 @@ _slang_preprocess_directives(slang_string *output,
 {
    grammar pid, eid;
    GLboolean success;
+   slang_string without_backslashes;
 
    pid = grammar_load_from_text ((const byte *) (slang_pp_directives_syn));
    if (pid == 0) {
@@ -1335,14 +1374,36 @@ _slang_preprocess_directives(slang_string *output,
       grammar_destroy (pid);
       return GL_FALSE;
    }
-   success = preprocess_source (output, input, pid, eid, elog, extensions, pragmas);
+
+   slang_string_init(&without_backslashes);
+   success = _slang_preprocess_backslashes(&without_backslashes, input);
+
+   if (0) {
+      _mesa_printf("Pre-processed shader:\n");
+      _mesa_printf("%s", slang_string_cstr(&without_backslashes));
+      _mesa_printf("----------------------\n");
+   }
+
+   if (success) {
+      success = preprocess_source(output,
+                                  slang_string_cstr(&without_backslashes),
+                                  pid,
+                                  eid,
+                                  elog,
+                                  extensions,
+                                  pragmas);
+   }
+
+   slang_string_free(&without_backslashes);
    grammar_destroy (eid);
    grammar_destroy (pid);
+
    if (0) {
       _mesa_printf("Post-processed shader:\n");
-      _mesa_printf("%s", output->data);
+      _mesa_printf("%s", slang_string_cstr(output));
       _mesa_printf("----------------------\n");
    }
+
    return success;
 }
 

commit 0269eb5e3f081c6e5d9ffddf7f6ca03f69b30fe5
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jun 10 12:25:11 2009 -0600

    glsl: Fix symbol replacement handling in preprocessor.
    
    (cherry picked from master, commit d9617deb008b75f4a605a30408aeb1948139c33e)

diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index b2530a6..5455ba6 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -1018,8 +1018,6 @@ preprocess_source (slang_string *output, const char *source,
          case TOKEN_DEFINE:
             {
                pp_symbol *symbol = NULL;
-               slang_string replacement;
-               expand_state es;
 
                /* Parse macro name. */
                id = (const char *) (&prod[i]);
@@ -1061,21 +1059,25 @@ preprocess_source (slang_string *output, const char *source,
                id = (const char *) (&prod[i]);
                idlen = _mesa_strlen (id);
                if (state.cond.top->effective) {
+                  slang_string replacement;
+                  expand_state es;
+


Reply to: