xserver: Branch 'glucose-2' - 9 commits

Alan Hourihane alanh at kemper.freedesktop.org
Wed Mar 28 17:42:21 EEST 2007


 GL/mesa/shader/slang/Makefile.am |    2 +-
 GL/mesa/swrast/Makefile.am       |    1 +
 composite/compext.c              |   24 ++++++++++++++++++++++++
 configure.ac                     |    4 ----
 exa/exa.c                        |    4 ----
 hw/kdrive/ephyr/ephyrinit.c      |    2 +-
 hw/xfree86/loader/misym.c        |    3 ---
 hw/xfree86/xaa/Makefile.am       |    1 +
 hw/xfree86/xaa/xaaInit.c         |    8 ++++++++
 miext/cw/cw.c                    |   24 ++++++++++--------------
 miext/cw/cw.h                    |    4 ----
 miext/damage/damage.c            |   10 ----------
 os/utils.c                       |    5 +----
 13 files changed, 47 insertions(+), 45 deletions(-)

New commits:
diff-tree c8133005298fa1d8338580a18ec5aeb48f795c76 (from parents)
Merge: 50cff83d0aee9af9234ad1118142cc55ee6a5919 85220446359a75ea2c359b418b4051c04eea739c
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date:   Wed Mar 28 15:42:15 2007 +0100

    Merge branch 'master' into glucose-2

diff-tree 85220446359a75ea2c359b418b4051c04eea739c (from 1af2ef0b25fd8017a3271e624a5f1548f02b09f9)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed Mar 28 13:03:32 2007 +0300

    GL: Update for Mesa changes
    Added s_fragprog.c to fix the build.

diff --git a/GL/mesa/swrast/Makefile.am b/GL/mesa/swrast/Makefile.am
index 9a6aa92..bffb1e7 100644
--- a/GL/mesa/swrast/Makefile.am
+++ b/GL/mesa/swrast/Makefile.am
@@ -34,6 +34,7 @@ nodist_libswrast_la_SOURCES = s_aaline.c
                       s_drawpix.c \
                       s_feedback.c \
                       s_fog.c \
+		      s_fragprog.c \
                       s_imaging.c \
                       s_lines.c \
                       s_logic.c \
diff-tree 1af2ef0b25fd8017a3271e624a5f1548f02b09f9 (from 0bfc3cc22db94ec6867596606fe93228e315c847)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 27 13:13:45 2007 -0700

    Enable Composite by default now that it disables itself in the known bad cases.

diff --git a/os/utils.c b/os/utils.c
index 2fc5cbb..e605a6c 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -136,10 +136,7 @@ _X_EXPORT Bool noTestExtensions;
 _X_EXPORT Bool noBigReqExtension = FALSE;
 #endif
 #ifdef COMPOSITE
- /* COMPOSITE is disabled by default for now until the
-  * interface is stable */
- #define COMPOSITE_DEFAULT FALSE
-_X_EXPORT Bool noCompositeExtension = !COMPOSITE_DEFAULT;
+_X_EXPORT Bool noCompositeExtension = FALSE;
 #endif
 
 #ifdef DAMAGE
diff-tree 0bfc3cc22db94ec6867596606fe93228e315c847 (from 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 27 13:12:21 2007 -0700

    Disable composite when Xinerama is active.
    
    It will likely take a decent bit of work to make that work right.

diff --git a/composite/compext.c b/composite/compext.c
index af05b4a..ba37e7d 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -696,6 +696,11 @@ CompositeExtensionInit (void)
 	if (GetPictureScreenIfSet(pScreen) == NULL)
 	    return;
     }
+    /* Xinerama's rewriting of window drawing before Composite gets to it
+     * breaks Composite.
+     */
+    if (!noPanoramiXExtension)
+	return;
 
     CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
     if (!CompositeClientWindowType)
diff-tree 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d (from 8afc7e2eb3ebec48d3879bf269143259c8bc18c8)
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 26 20:18:18 2007 -0700

    Disable Composite when the screen's visual is pseudocolor.
    
    Rendering fails badly in this case, and I don't care enough to fix it.

diff --git a/composite/compext.c b/composite/compext.c
index 3a9f896..af05b4a 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -678,9 +678,22 @@ CompositeExtensionInit (void)
     ExtensionEntry  *extEntry;
     int		    s;
 
-    /* Ensure that Render is initialized on all screens. */
     for (s = 0; s < screenInfo.numScreens; s++) {
-	if (GetPictureScreenIfSet(screenInfo.screens[s]) == NULL)
+	ScreenPtr pScreen = screenInfo.screens[s];
+	VisualPtr vis;
+
+	/* Composite on 8bpp pseudocolor root windows appears to fail, so
+	 * just disable it on anything pseudocolor for safety.
+	 */
+	for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++)
+	    ;
+	if ((vis->class | DynamicClass) == PseudoColor)
+	    return;
+
+	/* Ensure that Render is initialized, which is required for automatic
+	 * compositing.
+	 */
+	if (GetPictureScreenIfSet(pScreen) == NULL)
 	    return;
     }
 
diff-tree 8afc7e2eb3ebec48d3879bf269143259c8bc18c8 (from 6ed08949af4f7ac09170d3d9581e4092b24a84ee)
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 26 15:55:38 2007 -0700

    Refuse to initialize Composite if Render is not present.
    
    Composite relies on the presence of Render, in particular for the automatic
    compositing.

diff --git a/composite/compext.c b/composite/compext.c
index 4c25cc7..3a9f896 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -678,6 +678,12 @@ CompositeExtensionInit (void)
     ExtensionEntry  *extEntry;
     int		    s;
 
+    /* Ensure that Render is initialized on all screens. */
+    for (s = 0; s < screenInfo.numScreens; s++) {
+	if (GetPictureScreenIfSet(screenInfo.screens[s]) == NULL)
+	    return;
+    }
+
     CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
     if (!CompositeClientWindowType)
 	return;
diff-tree 6ed08949af4f7ac09170d3d9581e4092b24a84ee (from e76b6349516d5d1c8f7167d6f5419e0d06a546c3)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 27 17:31:28 2007 -0700

    Move libcw setup to the only renderer requiring it (XAA).
    
    Additionally, protect libcw setup behind checks for Render, to avoid
    segfaulting if Render isn't available (xnest).
    
    The previous setup was an ABI-preserving dance, which is better nuked now.
    Now, anything that needs libcw must explicitly initialize it, and
    miDisableCompositeWrapper (previously only called by EXA and presumably binary
    drivers) is gone.

diff --git a/configure.ac b/configure.ac
index 14c4ccb..fde6a89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -853,10 +853,6 @@ AC_DEFINE(DAMAGE,1,[Support Damage exten
 DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la'
 DAMAGE_INC='-I$(top_srcdir)/damageext'
 MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
-dnl damage (may) need the composite wrapper when composite is enabled
-if test "$COMPOSITE" = yes; then
-	MIEXT_DAMAGE_LIB="$MIEXT_DAMAGE_LIB "'$(top_builddir)/miext/cw/libcw.la'
-fi
 MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
 
 AC_DEFINE(XINPUT, 1, [Support X Input extension])
diff --git a/exa/exa.c b/exa/exa.c
index e9f42df..dd27d5e 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -668,10 +668,6 @@ exaDriverInit (ScreenPtr		pScreen,
     }
 #endif
 
-#ifdef COMPOSITE
-    miDisableCompositeWrapper(pScreen);
-#endif
-
 #ifdef MITSHM
     /* Re-register with the MI funcs, which don't allow shared pixmaps.
      * Shared pixmaps are almost always a performance loss for us, but this
diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c
index 46d6a02..78ae10e 100644
--- a/hw/xfree86/loader/misym.c
+++ b/hw/xfree86/loader/misym.c
@@ -208,9 +208,6 @@ _X_HIDDEN void *miLookupTab[] = {
 #ifdef RENDER
     SYMFUNC(miGlyphExtents)
 #endif
-#ifdef COMPOSITE
-    SYMFUNC(miDisableCompositeWrapper)
-#endif
 #ifdef DAMAGE
     SYMFUNC(DamageDamageRegion)
 #endif
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index 5d529b1..6ed8303 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -9,6 +9,7 @@ MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaSti
 POLYSEG = s-xaaLine.c s-xaaDashLine.c
 
 libxaa_la_LDFLAGS = -avoid-version
+libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
 
 module_LTLIBRARIES = libxaa.la
 libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 1542fc2..79a0e4c 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -227,6 +227,14 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr
     if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS)
 	miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4);
 
+#ifdef COMPOSITE
+    /* Initialize the composite wrapper.  This needs to happen after the
+     * wrapping above (so it comes before us), but before all other extensions,
+     * so it doesn't confuse them. (particularly damage).
+     */
+    miInitializeCompositeWrapper(pScreen);
+#endif
+
     return TRUE;
 }
 
diff --git a/miext/cw/cw.c b/miext/cw/cw.c
index f60f8cf..6950271 100644
--- a/miext/cw/cw.c
+++ b/miext/cw/cw.c
@@ -50,7 +50,6 @@ int cwWindowIndex;
 #ifdef RENDER
 int cwPictureIndex;
 #endif
-static Bool cwDisabled[MAXSCREENS];
 static unsigned long cwGeneration = 0;
 extern GCOps cwGCOps;
 
@@ -619,9 +618,9 @@ void
 miInitializeCompositeWrapper(ScreenPtr pScreen)
 {
     cwScreenPtr pScreenPriv;
-
-    if (cwDisabled[pScreen->myNum])
-	return;
+#ifdef RENDER
+    Bool has_render = GetPictureScreenIfSet(pScreen) != NULL;
+#endif
 
     if (cwGeneration != serverGeneration)
     {
@@ -631,7 +630,8 @@ miInitializeCompositeWrapper(ScreenPtr p
 	cwGCIndex = AllocateGCPrivateIndex();
 	cwWindowIndex = AllocateWindowPrivateIndex();
 #ifdef RENDER
-	cwPictureIndex = AllocatePicturePrivateIndex();
+	if (has_render)
+	    cwPictureIndex = AllocatePicturePrivateIndex();
 #endif
 	cwGeneration = serverGeneration;
     }
@@ -640,8 +640,10 @@ miInitializeCompositeWrapper(ScreenPtr p
     if (!AllocateWindowPrivate(pScreen, cwWindowIndex, 0))
 	return;
 #ifdef RENDER
-    if (!AllocatePicturePrivate(pScreen, cwPictureIndex, 0))
-	return;
+    if (has_render) {
+	if (!AllocatePicturePrivate(pScreen, cwPictureIndex, 0))
+	    return;
+    }
 #endif
     pScreenPriv = (cwScreenPtr)xalloc(sizeof(cwScreenRec));
     if (!pScreenPriv)
@@ -661,17 +663,11 @@ miInitializeCompositeWrapper(ScreenPtr p
     SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap);
 
 #ifdef RENDER
-    if (GetPictureScreen (pScreen))
+    if (has_render)
 	cwInitializeRender(pScreen);
 #endif
 }
 
-_X_EXPORT void
-miDisableCompositeWrapper(ScreenPtr pScreen)
-{
-    cwDisabled[pScreen->myNum] = TRUE;
-}
-
 static Bool
 cwCloseScreen (int i, ScreenPtr pScreen)
 {
diff --git a/miext/cw/cw.h b/miext/cw/cw.h
index 09cfc78..69abbbf 100644
--- a/miext/cw/cw.h
+++ b/miext/cw/cw.h
@@ -169,7 +169,3 @@ cwFiniRender (ScreenPtr pScreen);
 
 void
 miInitializeCompositeWrapper(ScreenPtr pScreen);
-
-/* Must be called before miInitializeCompositeWrapper */
-void
-miDisableCompositeWrapper(ScreenPtr pScreen);
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 6f1ee28..d930747 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1831,16 +1831,6 @@ DamageSetup (ScreenPtr pScreen)
     if (!pScrPriv)
 	return FALSE;
 
-#ifdef COMPOSITE
-    /* This is a kludge to ensure wrapping order with the composite wrapper.
-     * If it's done from compinit.c, then DamageSetup may be called before the
-     * extension init phase, so that cw will be higher in the wrapping chain and
-     * rewrite drawables before damage gets to it, causing confusion.
-     */
-    if (!noCompositeExtension)
-	miInitializeCompositeWrapper (pScreen);
-#endif
-	
     pScrPriv->internalLevel = 0;
     pScrPriv->pScreenDamage = 0;
 
diff-tree e76b6349516d5d1c8f7167d6f5419e0d06a546c3 (from 6a0bed16e80a91891cee6c7033c90875bc2af193)
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 26 16:04:50 2007 -0700

    Fix indentation of fakexa help text.

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index a77b87e..45e2d30 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -81,7 +81,7 @@ ddxUseMsg (void)
   ErrorF("-host-cursor  Re-use exisiting X host server cursor\n");
   ErrorF("-fullscreen   Attempt to run Xephyr fullscreen\n");
   ErrorF("-grayscale    Simulate 8bit grayscale\n");
-  ErrorF("-fakexa	Simulate acceleration using software rendering\n");
+  ErrorF("-fakexa       Simulate acceleration using software rendering\n");
   ErrorF("\n");
 
   exit(1);
diff-tree 6a0bed16e80a91891cee6c7033c90875bc2af193 (from b8f846a9dfc6697d59ad5482ba7c9d738875318e)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Mar 27 16:51:12 2007 +0200

    Fix typo in GL/mesa/shader/slang/Makefile.am.

diff --git a/GL/mesa/shader/slang/Makefile.am b/GL/mesa/shader/slang/Makefile.am
index 4bd48e9..7f0cd64 100644
--- a/GL/mesa/shader/slang/Makefile.am
+++ b/GL/mesa/shader/slang/Makefile.am
@@ -37,4 +37,4 @@ nodist_libslang_la_SOURCES = slang_built
 		      slang_storage.c \
 		      slang_typeinfo.c \
 		      slang_utility.c \
-		      slang_variable.c
+		      slang_vartable.c



More information about the xorg-commit mailing list