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

X Strike Force XFree86 SVN commit: rev 712 - in trunk/debian: . patches



Author: branden
Date: 2003-10-24 15:47:33 -0500 (Fri, 24 Oct 2003)
New Revision: 712

Added:
   trunk/debian/patches/000_stolen_from_HEAD_xaa.diff
Modified:
   trunk/debian/changelog
   trunk/debian/patches/000_stolen_from_HEAD.diff
Log:
Grab latest fixes to XAA (X Acceleration Architecture) from upstream CVS
HEAD.

- debian/patches/000_stolen_from_HEAD.diff: remove existing XaaPCache
  patch (moved to 000_stolen_from_HEAD_xaa.diff)
- debian/patches/000_stolen_from_HEAD_xaa.diff: new;
  + (xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c): Fix a bug filling
    trapezoids in some obscure 8x8 pattern fill case. (Mark Vojkovich)
  + (xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c): Fix Color8x8 cache
    bug (pattern expanded from source) (Thomas Winischhofer)
  + (xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c):
    - move existing XaaPCache patch (crash while off-screen memory heavily
      fragmented) to this patch
    - Warning fix (Alan Hourihane).
    - Change XAA to not sync when it sees RENDER operations that don't
      touch VRAM, and to try to accelerate Glyphs with Composite if it
      seems likely that will work (#5509, Nolan Leake).
    - Add missing tests for vtSema to xaa 'Picture' functions.  These
      missing checks caused strange behavior with some drivers when RENDER
      extension requests were made while X was switched away.  (Egbert
      Eich)
  + (xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c): Fix an XAA stipple
    bug that's been there for some 4+ years. (Mark Vojkovich)


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2003-10-24 18:46:09 UTC (rev 711)
+++ trunk/debian/changelog	2003-10-24 20:47:33 UTC (rev 712)
@@ -217,8 +217,31 @@
     - debian/patches/000_stolen_from_HEAD.diff: updated
     - debian/patches/002_xdm_fixes.diff: resynced
 
- -- Branden Robinson <branden@debian.org>  Fri, 24 Oct 2003 13:33:35 -0500
+  * Grab latest fixes to XAA (X Acceleration Architecture) from upstream CVS
+    HEAD.
+    - debian/patches/000_stolen_from_HEAD.diff: remove existing XaaPCache
+      patch (moved to 000_stolen_from_HEAD_xaa.diff)
+    - debian/patches/000_stolen_from_HEAD_xaa.diff: new;
+      + (xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c): Fix a bug filling
+        trapezoids in some obscure 8x8 pattern fill case. (Mark Vojkovich)
+      + (xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c): Fix Color8x8 cache
+        bug (pattern expanded from source) (Thomas Winischhofer)
+      + (xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c):
+        - move existing XaaPCache patch (crash while off-screen memory heavily
+          fragmented) to this patch
+        - Warning fix (Alan Hourihane).
+        - Change XAA to not sync when it sees RENDER operations that don't
+          touch VRAM, and to try to accelerate Glyphs with Composite if it
+          seems likely that will work (#5509, Nolan Leake).
+        - Add missing tests for vtSema to xaa 'Picture' functions.  These
+          missing checks caused strange behavior with some drivers when RENDER
+          extension requests were made while X was switched away.  (Egbert
+          Eich)
+      + (xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c): Fix an XAA stipple
+        bug that's been there for some 4+ years. (Mark Vojkovich)
 
+ -- Branden Robinson <branden@debian.org>  Fri, 24 Oct 2003 15:38:12 -0500
+
 xfree86 (4.2.1-12.1) unstable; urgency=low
 
   * Fix typo in xlibs preinst.  Closes: #213774, #213776

Modified: trunk/debian/patches/000_stolen_from_HEAD.diff
===================================================================
--- trunk/debian/patches/000_stolen_from_HEAD.diff	2003-10-24 18:46:09 UTC (rev 711)
+++ trunk/debian/patches/000_stolen_from_HEAD.diff	2003-10-24 20:47:33 UTC (rev 712)
@@ -253,11 +253,6 @@
     #646).
   Backported from XFree86 CVS HEAD.
 
-(xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c):
-  376. Fix an XAA pixmap cache server crash that can happen in some cases
-  when the off-screen memory is heavily fragmented (David Dawes, based on
-  #5752, Koike Kazuhiko, Chisato Yamauchi).
-
 (xc/lib/Xi/XExtInt.c,
  xc/lib/Xi/XGetVers.c,
  xc/lib/Xi/XIint.h):
@@ -5318,30 +5313,6 @@
  #endif
  #ifndef OPEN_MAX
  #if defined(SVR4) || defined(__EMX__)
---- xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c~	2003-09-10 15:12:05.000000000 -0500
-+++ xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c	2003-09-10 15:12:19.000000000 -0500
-@@ -763,6 +763,7 @@
- 	1) Don't take up more than half the memory.
- 	2) Don't bother if you can't get at least four.
- 	3) Don't make more than MAX_512.
-+	4) Don't have any of there are no 256x256s.
- 
-      256x256 -
- 	1) Don't take up more than a quarter of the memory enless there
-@@ -786,6 +787,13 @@
-     else Target256 = ntotal >> 4;
-     if(Target256 < 4) Target256 = 0;
- 
-+    if(Num512 && Num256 < 4) {
-+	while(Num512 && Num256 < Target256) {
-+	   SubdivideList(&List512, &List256);
-+	   Num256 += 4; Num512--;
-+	}
-+    }
-+
-     if(!Num512) { /* no room */
-     } else if((Num512 < 4) || (!Target512)) {
- 	while(Num512) {
 --- xc/lib/Xi/XGetVers.c	2002-10-16 02:37:29.000000000 +0200
 +++ xc/lib/Xi/XGetVers.c	2003-07-08 13:58:15.000000000 +0200
 @@ -71,12 +71,33 @@

Added: trunk/debian/patches/000_stolen_from_HEAD_xaa.diff
===================================================================
--- trunk/debian/patches/000_stolen_from_HEAD_xaa.diff	2003-10-24 18:46:09 UTC (rev 711)
+++ trunk/debian/patches/000_stolen_from_HEAD_xaa.diff	2003-10-24 20:47:33 UTC (rev 712)
@@ -0,0 +1,257 @@
+$Id$
+
+(xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c):
+  Fix a bug filling trapezoids in some obscure 8x8 pattern fill case. (Mark
+  Vojkovich)
+
+(xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c):
+  376. Fix an XAA pixmap cache server crash that can happen in some cases
+       when the off-screen memory is heavily fragmented (David Dawes, based
+       on #5752, Koike Kazuhiko, Chisato Yamauchi).
+
+  Fix Color8x8 cache bug (pattern expanded from source) (Thomas Winischhofer)
+
+(xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c):
+  Warning fix (Alan Hourihane).
+
+  598. Change XAA to not sync when it sees RENDER operations that don't
+       touch VRAM, and to try to accelerate Glyphs with Composite if it
+       seems likely that will work (#5509, Nolan Leake).
+
+  125. Add missing tests for vtSema to xaa 'Picture' functions.  These missing
+       checks caused strange behavior with some drivers when RENDER extension
+       requests were made while X was switched away.  (Egbert Eich)
+
+(xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c):
+  Fix an XAA stipple bug that's been there for some 4+ years. (Mark Vojkovich)
+
+diff -urN xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c
+--- xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c	2001-10-27 22:34:04.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c	2003-09-13 12:44:00.000000000 -0500
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c,v 1.15 2001/10/28 03:34:04 tsi Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c,v 1.16 2003/03/23 03:41:44 mvojkovi Exp $ */
+ 
+ /*
+  * Copyright 1996  The XFree86 Project
+@@ -770,7 +770,11 @@
+ 		    pCache = (*infoRec->CacheMono8x8Pattern)(
+ 					infoRec->pScrn, patx, paty);
+ 		    patx = pCache->x;  paty = pCache->y;
+-	    	}
++	    	} else {
++                    pCache = &(infoRec->ScratchCacheInfoRec);
++                    pCache->pat0 = patx;
++                    pCache->pat1 = paty;
++                }
+ 		RectFunc = Mono8x8PatternRectHelper;
+        	    }
+ 
+diff -urN xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c
+--- xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c	2003-08-15 20:13:58.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c	2003-10-10 03:59:08.000000000 -0500
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v 1.30 2000/09/25 23:56:14 mvojkovi Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v 1.32 2003/10/06 18:20:14 twini Exp $ */
+ 
+ #include "misc.h"
+ #include "xf86.h"
+@@ -763,6 +763,7 @@
+ 	1) Don't take up more than half the memory.
+ 	2) Don't bother if you can't get at least four.
+ 	3) Don't make more than MAX_512.
++	4) Don't have any of there are no 256x256s.
+ 
+      256x256 -
+ 	1) Don't take up more than a quarter of the memory enless there
+@@ -786,6 +787,13 @@
+     else Target256 = ntotal >> 4;
+     if(Target256 < 4) Target256 = 0;
+ 
++    if(Num512 && Num256 < 4) {
++	while(Num512 && Num256 < Target256) {
++	   SubdivideList(&List512, &List256);
++	   Num256 += 4; Num512--;
++	}
++    }
++
+     if(!Num512) { /* no room */
+     } else if((Num512 < 4) || (!Target512)) {
+ 	while(Num512) {
+@@ -2044,7 +2052,7 @@
+          nw = w;
+          memcpy(dstPtr, srcPtr, w * Bpp);
+          while (nw != 8) {
+-            memcpy(dstPtr + (nw * Bpp), srcPtr, nw * Bpp);
++            memcpy(dstPtr + (nw * Bpp), dstPtr, nw * Bpp);
+             nw <<= 1;
+          }
+    }
+diff -urN xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c
+--- xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c	2002-12-09 23:17:21.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c	2003-09-13 12:44:00.000000000 -0500
+@@ -231,7 +237,7 @@
+ 	       (op == PictOpOver) && infoRec->WriteBitmap && !pMask->repeat &&
+ 	       !(infoRec->WriteBitmapFlags & NO_TRANSPARENCY) &&
+ 	       (!(infoRec->WriteBitmapFlags & RGB_EQUAL) || 
+-	         (red == green == blue)))
++	         ((red == green) && (green == blue))))
+ 	   {
+ 	        PixmapPtr pPix = (PixmapPtr)(pMask->pDrawable);
+ 		int skipleft;
+@@ -425,8 +431,14 @@
+        !(*infoRec->Composite)(op, pSrc, pMask, pDst,
+                        xSrc, ySrc, xMask, yMask, xDst, yDst,
+                        width, height))
+-    { 
+-        SYNC_CHECK(pDst->pDrawable);
++    {
++        if((pSrc->pDrawable->type == DRAWABLE_WINDOW ||
++           pDst->pDrawable->type == DRAWABLE_WINDOW ||
++           IS_OFFSCREEN_PIXMAP(pSrc->pDrawable) ||
++           IS_OFFSCREEN_PIXMAP(pDst->pDrawable))
++	   && infoRec->pScrn->vtSema) {
++            SYNC_CHECK(pDst->pDrawable);
++        }
+         (*GetPictureScreen(pScreen)->Composite) (op,
+ 		       pSrc,
+ 		       pMask,
+@@ -495,7 +507,7 @@
+ 
+ 	XAAGetPixelFromRGBA(&pixel, red, green, blue, 0, pDst->format);
+ 
+-	if((infoRec->WriteBitmapFlags & RGB_EQUAL) && !(red == green == blue))
++	if((infoRec->WriteBitmapFlags & RGB_EQUAL) && !((red == green) && (green == blue)))
+ 	   return FALSE;
+ 
+ 	x = pDst->pDrawable->x;
+@@ -617,7 +629,22 @@
+ 	return TRUE;
+     }
+ 
+-    return FALSE;
++    /*
++     * If it looks like we have a chance of being able to draw these
++     * glyphs with an accelerated Composite, do that now to avoid
++     * unneeded and costly syncs.
++     */
++    if(maskFormat) {
++        if(!infoRec->CPUToScreenAlphaTextureFormats)
++            return FALSE;
++    } else {
++        if(!infoRec->CPUToScreenTextureFormats)
++            return FALSE;
++    }
++
++    miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
++
++    return TRUE;
+ }	   
+ 	 
+ 	
+@@ -640,7 +667,13 @@
+        !(*infoRec->Glyphs)(op, pSrc, pDst, maskFormat,
+                                           xSrc, ySrc, nlist, list, glyphs))
+     {
+-       SYNC_CHECK(pDst->pDrawable);
++       if(((pSrc->pDrawable->type == DRAWABLE_WINDOW) ||
++          (pDst->pDrawable->type == DRAWABLE_WINDOW) ||
++          IS_OFFSCREEN_PIXMAP(pSrc->pDrawable) ||
++          IS_OFFSCREEN_PIXMAP(pDst->pDrawable))
++	  && infoRec->pScrn->vtSema) {
++           SYNC_CHECK(pDst->pDrawable);
++       }
+        (*GetPictureScreen(pScreen)->Glyphs) (op, pSrc, pDst, maskFormat,
+ 					  xSrc, ySrc, nlist, list, glyphs);
+     }
+diff -urN xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c
+--- xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c	2001-10-27 22:34:04.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c	2003-09-13 12:44:00.000000000 -0500
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c,v 1.11 2001/10/28 03:34:04 tsi Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c,v 1.12 2003/08/04 22:18:31 mvojkovi Exp $ */
+ 
+ #include "xaa.h"
+ #include "xaalocal.h"
+@@ -762,20 +762,28 @@
+ ){
+    CARD32* srcp;
+    CARD32 bits;
+-   int bitsleft, shift;   
++   int bitsleft, shift, usable;   
+ 
+    while(dwords--) {
+-	bitsleft = width - offset;
+-	srcp = src + (offset >> 5);
+-	shift = offset & 31;
+-
+-	if(bitsleft < 32)
+-	    bits = SHIFT_L(*src,bitsleft) | 
+-		      (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
+-	else if(shift)
+-	    bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],32-shift);
+-	else
+-	    bits = *srcp;
++        bitsleft = width - offset;
++        srcp = src + (offset >> 5);
++        shift = offset & 31;
++        usable = 32 - shift;
++
++        if(bitsleft < 32) {
++            if(bitsleft <= usable) {
++                 bits = SHIFT_L(*src,bitsleft) | 
++                       (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
++            } else {
++                 bits = SHIFT_L(*src,bitsleft) |
++                       (SHIFT_L(srcp[1],usable) & XAAShiftMasks[bitsleft]) |
++                       (SHIFT_R(*srcp,shift) & XAAShiftMasks[usable]);
++            }
++        }
++        else if(shift)
++            bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],usable);
++        else
++            bits = *srcp;
+ 
+ #ifdef TRIPLE_BITS
+ 	if(dwords >= 2) {
+@@ -805,20 +813,28 @@
+ ){
+    CARD32* srcp;
+    CARD32 bits;
+-   int bitsleft, shift;   
++   int bitsleft, shift, usable;
+ 
+    while(dwords--) {
+-	bitsleft = width - offset;
+-	srcp = src + (offset >> 5);
+-	shift = offset & 31;
+-
+-	if(bitsleft < 32)
+-	    bits = SHIFT_L(*src,bitsleft) | 
+-		      (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
+-	else if(shift)
+-	    bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],32-shift);
+-	else
+-	    bits = *srcp;
++        bitsleft = width - offset;
++        srcp = src + (offset >> 5);
++        shift = offset & 31;
++        usable = 32 - shift;
++
++        if(bitsleft < 32) {
++            if(bitsleft <= usable) {
++                 bits = SHIFT_L(*src,bitsleft) |
++                       (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
++            } else {
++                 bits = SHIFT_L(*src,bitsleft) |
++                       (SHIFT_L(srcp[1],usable) & XAAShiftMasks[bitsleft]) |
++                       (SHIFT_R(*srcp,shift) & XAAShiftMasks[usable]);
++            }
++        }
++        else if(shift)
++            bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],usable);
++        else
++            bits = *srcp;
+ 
+ 	bits = ~bits;
+ 


Property changes on: trunk/debian/patches/000_stolen_from_HEAD_xaa.diff
___________________________________________________________________
Name: svn:keywords
   + Id



Reply to: