diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 91c9a79..04e37d9 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -30,7 +30,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.10.0 -Release: 6%{?gitdate:.%{gitdate}}%{dist} +Release: 7%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -86,6 +86,9 @@ Patch7005: xserver-1.9.0-qxl-fallback.patch Patch7006: xserver-1.10-pointer-barriers.patch Patch7007: xserver-1.10-vbe-malloc.patch +# from ajax/xserver-next +Patch7008: xserver-1.10-glx-pixmap-crash.patch +Patch7009: xserver-1.10-bg-none-revert.patch %define moduledir %{_libdir}/xorg/modules %define drimoduledir %{_libdir}/dri @@ -551,6 +554,10 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Wed Mar 30 2011 Adam Jackson 1.10.0-7 +- xserver-1.10-glx-pixmap-crash.patch, xserver-1.10-bg-none-revert.patch: + bugfixes from xserver-next + * Tue Mar 22 2011 Adam Jackson 1.10.0-6 - Fix thinko in pointer barrier patch diff --git a/xserver-1.10-bg-none-revert.patch b/xserver-1.10-bg-none-revert.patch new file mode 100644 index 0000000..1388522 --- /dev/null +++ b/xserver-1.10-bg-none-revert.patch @@ -0,0 +1,62 @@ +From 3bc6ed2d8c9028ec28015d05b60af67a194f3694 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 29 Mar 2011 10:09:46 -0400 +Subject: [PATCH 2/2] Revert "composite: Don't backfill non-bg-None windows" + +This reverts commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc. + +Bugzilla: https://bugs.freedesktop.org/34427 + +Acked-by: Alex Deucher +Signed-off-by: Adam Jackson +--- + composite/compalloc.c | 26 -------------------------- + 1 files changed, 0 insertions(+), 26 deletions(-) + +diff --git a/composite/compalloc.c b/composite/compalloc.c +index e4064f6..7164c0d 100644 +--- a/composite/compalloc.c ++++ b/composite/compalloc.c +@@ -508,17 +508,6 @@ compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin) + return Success; + } + +-static int +-bgNoneVisitWindow(WindowPtr pWin, void *null) +-{ +- if (pWin->backgroundState != BackgroundPixmap) +- return WT_WALKCHILDREN; +- if (pWin->background.pixmap != None) +- return WT_WALKCHILDREN; +- +- return WT_STOPWALKING; +-} +- + static PixmapPtr + compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map) + { +@@ -539,21 +528,6 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map) + if (!map) + return pPixmap; + +- /* +- * If there's no bg=None in the tree, we're done. +- * +- * We could optimize this more by collection the regions of all the +- * bg=None subwindows and feeding that in as the clip for the +- * CopyArea below, but since window trees are shallow these days it +- * might not be worth the effort. +- */ +- if (TraverseTree(pWin, bgNoneVisitWindow, NULL) == WT_NOMATCH) +- return pPixmap; +- +- /* +- * Copy bits from the parent into the new pixmap so that it will +- * have "reasonable" contents in case for background None areas. +- */ + if (pParent->drawable.depth == pWin->drawable.depth) + { + GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen); +-- +1.7.4.1 + diff --git a/xserver-1.10-glx-pixmap-crash.patch b/xserver-1.10-glx-pixmap-crash.patch new file mode 100644 index 0000000..ae635af --- /dev/null +++ b/xserver-1.10-glx-pixmap-crash.patch @@ -0,0 +1,93 @@ +From 2fefa1aff56f6d24dcc0206c60da3d9487832504 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 30 Mar 2011 16:03:53 -0400 +Subject: [PATCH] glx: Fix lifetime tracking for pixmaps +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap +IDs can be destroyed in either order with no error. Only windows need +to be tracked under both XIDs. + +Fixes piglit/glx-pixmap-life. + +Reviewed-by: Michel Dänzer +Signed-off-by: Adam Jackson +--- + glx/glxcmds.c | 11 +++++++---- + glx/glxext.c | 22 +++++++++++++--------- + 2 files changed, 20 insertions(+), 13 deletions(-) + +diff --git a/glx/glxcmds.c b/glx/glxcmds.c +index 9b4bc9e..9d60bdb 100644 +--- a/glx/glxcmds.c ++++ b/glx/glxcmds.c +@@ -1177,10 +1177,11 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, + return BadAlloc; + } + +- /* Add the glx drawable under the XID of the underlying X drawable +- * too. That way we'll get a callback in DrawableGone and can +- * clean up properly when the drawable is destroyed. */ +- if (drawableId != glxDrawableId && ++ /* ++ * Windows aren't refcounted, so track both the X and the GLX window ++ * so we get called regardless of destruction order. ++ */ ++ if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW && + !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) { + pGlxDraw->destroy (pGlxDraw); + return BadAlloc; +@@ -1211,6 +1212,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config + err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId, + glxDrawableId, GLX_DRAWABLE_PIXMAP); + ++ ((PixmapPtr)pDraw)->refcnt++; ++ + return err; + } + +diff --git a/glx/glxext.c b/glx/glxext.c +index 4bd5d6b..cec3ee5 100644 +--- a/glx/glxext.c ++++ b/glx/glxext.c +@@ -124,15 +124,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) + { + __GLXcontext *c, *next; + +- /* If this drawable was created using glx 1.3 drawable +- * constructors, we added it as a glx drawable resource under both +- * its glx drawable ID and it X drawable ID. Remove the other +- * resource now so we don't a callback for freed memory. */ +- if (glxPriv->drawId != glxPriv->pDraw->id) { +- if (xid == glxPriv->drawId) +- FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE); +- else +- FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); ++ if (glxPriv->type == GLX_DRAWABLE_WINDOW) { ++ /* If this was created by glXCreateWindow, free the matching resource */ ++ if (glxPriv->drawId != glxPriv->pDraw->id) { ++ if (xid == glxPriv->drawId) ++ FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE); ++ else ++ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); ++ } ++ /* otherwise this window was implicitly created by MakeCurrent */ + } + + for (c = glxAllContexts; c; c = next) { +@@ -168,6 +168,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) + __glXFreeContext(c); + } + ++ /* drop our reference to any backing pixmap */ ++ if (glxPriv->type == GLX_DRAWABLE_PIXMAP) ++ glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw); ++ + glxPriv->destroy(glxPriv); + + return True; +-- +1.7.4.1 +