From ed663d805fda2f0f1676f62e335f48b5b3731d88 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Aug 31 2006 00:41:14 +0000 Subject: * Wed Aug 30 2006 Kristian Høgsberg - 1.1.1-33.fc6 - Update xorg-x11-server-1.1.1-offscreen-pixmaps.patch to evict pixmap when GLX_EXT_texture_from_pixmap is first used. --- diff --git a/xorg-x11-server-1.1.1-offscreen-pixmaps.patch b/xorg-x11-server-1.1.1-offscreen-pixmaps.patch index f9e65fa..3841b04 100644 --- a/xorg-x11-server-1.1.1-offscreen-pixmaps.patch +++ b/xorg-x11-server-1.1.1-offscreen-pixmaps.patch @@ -1,104 +1,55 @@ ---- ./hw/xfree86/xaa/xaa.h.offscreen-pixmaps 2006-08-28 15:33:34.000000000 -0400 -+++ ./hw/xfree86/xaa/xaa.h 2006-08-28 15:33:36.000000000 -0400 -@@ -1373,6 +1373,9 @@ - ); - CARD32 *CPUToScreenTextureDstFormats; - #endif /* RENDER */ -+ -+ unsigned int savedOffscreenDepths; -+ - } XAAInfoRec, *XAAInfoRecPtr; - - #define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE --- ./hw/xfree86/xaa/xaaInit.c.offscreen-pixmaps 2006-07-05 14:31:42.000000000 -0400 -+++ ./hw/xfree86/xaa/xaaInit.c 2006-08-28 15:31:03.000000000 -0400 -@@ -4,6 +4,7 @@ - #include - #endif - -+#include - #include "misc.h" - #include "xf86.h" - #include "xf86_OSproc.h" -@@ -20,6 +21,7 @@ - #include "xaawrap.h" - #include "xf86fbman.h" - #include "servermd.h" -+#include "selection.h" - - #define MAX_PREALLOC_MEM 65536 /* MUST be >= 1024 */ - -@@ -98,6 +100,49 @@ ++++ ./hw/xfree86/xaa/xaaInit.c 2006-08-30 16:47:29.000000000 -0400 +@@ -98,6 +98,30 @@ xfree(infoRec); } -+static void -+SelectionChangedCallback (CallbackListPtr *list, -+ pointer xaaData, pointer callData) ++void ++XAAEvictPixmaps(void) +{ -+ static char atom_name[] = "_COMPIZ_GL_INCLUDE_INFERIORS"; ++ XAAScreenPtr pScreenPriv; ++ XAAInfoRecPtr infoRec; ++ ScreenPtr pScreen; ++ int i; + -+ SelectionInfoRec *info = callData; -+ XAAInfoRecPtr infoRec = xaaData; -+ ScreenPtr pScreen = infoRec->pScrn->pScreen; -+ Atom atom; ++ xf86MsgVerb(X_INFO, 3, "XAA: Evicting pixmaps\n"); + -+ atom = MakeAtom(atom_name, strlen(atom_name), 0); -+ if (info->selection->selection != atom) -+ return; ++ for (i = 0; i < screenInfo.numScreens; i++) { ++ pScreen = screenInfo.screens[i]; ++ infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); ++ ++ pScreenPriv = pScreen->devPrivates[XAAScreenIndex].ptr; ++ infoRec = pScreenPriv->AccelInfoRec; + -+ if (info->kind == SelectionSetOwner && info->selection->window != None) -+ { -+ infoRec->savedOffscreenDepths = infoRec->offscreenDepths; + infoRec->offscreenDepths = 0; + infoRec->Flags &= ~OFFSCREEN_PIXMAPS; + + XAAMoveOutOffscreenPixmaps(pScreen); + XAAInvalidatePixmapCache(pScreen); -+ -+ xf86MsgVerb(X_INFO, 3, "'%s' selection grabbed; evicting pixmaps for screen %d\n", -+ atom_name, pScreen->myNum); -+ } -+ else if (infoRec->savedOffscreenDepths > 0) -+ { -+ infoRec->Flags |= OFFSCREEN_PIXMAPS; -+ infoRec->offscreenDepths = infoRec->savedOffscreenDepths; -+ -+ if (!SwitchedOut) { -+ xf86MsgVerb(X_INFO, 3, "'%s' selection released; pulling in pixmaps for screen %d\n", -+ atom_name, pScreen->myNum); -+ -+ XAAMoveInOffscreenPixmaps(pScreen); -+ } else { -+ xf86MsgVerb(X_INFO, 3, "'%s' selection released; will pull in pixmaps for screen %d when switched back in.\n", -+ atom_name, pScreen->myNum); -+ } + } +} Bool XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) -@@ -228,11 +273,11 @@ - if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS) - miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4); - -+ AddCallback(&SelectionCallback, SelectionChangedCallback, infoRec); +--- ./GL/glx/glxdri.c.offscreen-pixmaps 2006-08-30 16:46:45.000000000 -0400 ++++ ./GL/glx/glxdri.c 2006-08-30 16:45:52.000000000 -0400 +@@ -367,6 +367,19 @@ + int bpp; + GLenum target, format, type; + ++ /* When the GLX_EXT_texture_from_pixmap is used, as it's ++ * implemented here, we want to pull pixmap out of video memory ++ * and into host memory. */ ++ { ++ extern void XAAEvictPixmaps(void); ++ static int evictedPixmaps; + - return TRUE; - } - -- -- - static Bool - XAACloseScreen (int i, ScreenPtr pScreen) - { -@@ -264,6 +309,9 @@ - - xfree ((pointer) pScreenPriv); - -+ DeleteCallback(&SelectionCallback, SelectionChangedCallback, -+ pScreenPriv->AccelInfoRec); ++ if (!evictedPixmaps) { ++ XAAEvictPixmaps(); ++ evictedPixmaps = TRUE; ++ } ++ } + - return (*pScreen->CloseScreen) (i, pScreen); - } - + pixmap = (PixmapPtr) glxPixmap->pDraw; + if (!glxPixmap->pDamage) { + glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone, diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index c6333ec..0e0db84 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -3,12 +3,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.1.1 -# NOTE: Now using the 'dist' tag as per http://fedoraproject.org/wiki/DistTag -# For rawhide builds, bump the number /before/ the dist tag. For package -# upgrades to officially released distribution releases, if the package -# Version field above is not changing, append and/or bump a digit /after/ -# the dist tag. ie: 25%{?dist}.0 -> 25%{?dist}.1 ... -Release: 32%{?dist} +Release: 33%{?dist} URL: http://www.x.org License: MIT/X11 Group: User Interface/X @@ -708,6 +703,10 @@ rm -rf $RPM_BUILD_ROOT # ------------------------------------------------------------------- %changelog +* Wed Aug 30 2006 Kristian Høgsberg - 1.1.1-33.fc6 +- Update xorg-x11-server-1.1.1-offscreen-pixmaps.patch to evict pixmap + when GLX_EXT_texture_from_pixmap is first used. + * Wed Aug 30 2006 Kristian Høgsberg - 1.1.1-32.fc6 - Drop xorg-x11-server-1.1.0-gl-include-inferiors.patch now that compiz can uses the composite overlay window.