xserver: Branch 'master' - 3 commits

Michel Daenzer daenzer at kemper.freedesktop.org
Mon Jul 28 00:34:04 PDT 2008


 glx/glxcmds.c                           |    6 +++---
 glx/glxdri.c                            |    8 ++++++--
 hw/xfree86/os-support/linux/Makefile.am |    2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit ec10eccd56be8b947cd63cae0687b8319857fe60
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Jul 28 09:33:04 2008 +0200

    GLX: Unreference drawables bound to the old context, not the new one.
    
    Apart from the obvious reference counting issue, this fixes
    http://bugs.freedesktop.org/show_bug.cgi?id=16867 .

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index f4fc031..19d8674 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -620,9 +620,9 @@ DoMakeCurrent(__GLXclientState *cl,
 	    return __glXError(GLXBadContext);
 	}
 	__glXFlushContextCache();
-	if (!glxc->isDirect) {
-	    __glXUnrefDrawable(glxc->drawPriv);
-	    __glXUnrefDrawable(glxc->readPriv);
+	if (!prevglxc->isDirect) {
+	    __glXUnrefDrawable(prevglxc->drawPriv);
+	    __glXUnrefDrawable(prevglxc->readPriv);
 	}
     }
 	
commit 6ab8d6010adfd5ad6f1e1094a26c84f0aff934b1
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Jul 28 09:32:59 2008 +0200

    AIGLX/DRI1: Pay more attention to return value from DRIGetDrawableInfo().
    
    Could have crashed otherwise if the num(Back)ClipRects variables referenced by
    the caller weren't pre-initialized to 0.

diff --git a/glx/glxdri.c b/glx/glxdri.c
index 41c47a8..8ae56ed 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -740,7 +740,7 @@ getDrawableInfo(__DRIdrawable *driDrawable,
 				numBackClipRects, &pBackClipRects);
     __glXleaveServer(GL_FALSE);
 
-    if (*numClipRects > 0) {
+    if (retval && *numClipRects > 0) {
 	size = sizeof (drm_clip_rect_t) * *numClipRects;
 	*ppClipRects = xalloc (size);
 
@@ -771,16 +771,20 @@ getDrawableInfo(__DRIdrawable *driDrawable,
     }
     else {
       *ppClipRects = NULL;
+      *numClipRects = 0;
     }
       
-    if (*numBackClipRects > 0) {
+    if (retval && *numBackClipRects > 0) {
 	size = sizeof (drm_clip_rect_t) * *numBackClipRects;
 	*ppBackClipRects = xalloc (size);
 	if (*ppBackClipRects != NULL)
 	    memcpy (*ppBackClipRects, pBackClipRects, size);
+	else
+	    *numBackClipRects = 0;
     }
     else {
       *ppBackClipRects = NULL;
+      *numBackClipRects = 0;
     }
 
     return retval;
commit b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Jul 28 09:32:54 2008 +0200

    Fix Makefile.am crack.
    
    Looks like an artifact from early modularization.

diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index f736095..02a4e0c 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -40,7 +40,7 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c \
 
 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
 
-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
+INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
 
 # FIXME: These need to be added to the build
 LNX_EXTRA_SRCS = \


More information about the xorg-commit mailing list