Current tinderbox regressions (video drivers)

Michel Dänzer michel at daenzer.net
Thu Feb 26 03:07:46 PST 2009


On Thu, 2009-02-26 at 12:02 +0100, Matthias Hopf wrote:
> On Feb 26, 09 11:41:32 +0100, Michel Dänzer wrote:
> > In hindsight, I agree the below should work. How does it look?
> 
> Looks good to me, except for it's missing the nuked hook

The patch is on top of

commit 3d5410d18729c552fe026a206a26ccda266a9e32
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Thu Feb 26 10:41:12 2009 +0100

    Revert "EXA: Handle separate alpha maps properly in Composite
fallback."
    
    This reverts commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5.

> (if any driver used it it should be re-added, and just not used any
> more - and this has to be commented.

I have the below queued for that. :)


>From 04711dca0cb053b75bfdcc16fa68eed1156df1ad Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Michel=20D=C3=A4nzer?= <daenzer at vmware.com>
Date: Thu, 26 Feb 2009 11:20:08 +0100
Subject: [PATCH] EXA: No longer use the driver UploadToScratch hook.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

See http://bugs.freedesktop.org/show_bug.cgi?id=20213 .

Signed-off-by: Michel Dänzer <daenzer at vmware.com>
---
 exa/exa.h        |   23 ++---------------------
 exa/exa_render.c |   19 -------------------
 2 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/exa/exa.h b/exa/exa.h
index 12959e1..f3868b8 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -499,27 +499,8 @@ typedef struct _ExaDriver {
                                    int                  src_pitch);
 
     /**
-     * UploadToScratch() is used to upload a pixmap to a scratch area for
-     * acceleration.
-     *
-     * @param pSrc source pixmap in host memory
-     * @param pDst fake, scratch pixmap to be set up in offscreen memory.
-     *
-     * The UploadToScratch() call was added to support Xati before Xati had
-     * support for hostdata uploads and before exaGlyphs() was written.  It
-     * behaves incorrectly (uses an invalid pixmap as pDst),
-     * and UploadToScreen() should be implemented instead.
-     *
-     * Drivers implementing UploadToScratch() had to set up space (likely in a
-     * statically allocated area) in offscreen memory, copy pSrc to that
-     * scratch area, and adust pDst->devKind for the pitch and
-     * pDst->devPrivate.ptr for the pointer to that scratch area.  The driver
-     * was responsible for syncing (as it was implemented using memcpy() in
-     * Xati), and only the data from the last UploadToScratch() was guaranteed
-     * to be valid at any given time.
-     *
-     * UploadToScratch() should not be implemented by drivers, and will likely
-     * be removed in a future version of EXA.
+     * UploadToScratch() is no longer used and will be removed next time the EXA
+     * major version needs to be bumped.
      */
     Bool        (*UploadToScratch) (PixmapPtr           pSrc,
                                     PixmapPtr           pDst);
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 1a5d0ef..a934497 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -343,7 +343,6 @@ exaTryDriverCompositeRects(CARD8	       op,
     int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
     PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
     ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix;
-    struct _Pixmap scratch;
     ExaMigrationRec pixmaps[3];
 
     if (!pExaScr->info->PrepareComposite)
@@ -399,13 +398,6 @@ exaTryDriverCompositeRects(CARD8	       op,
     
     pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
 
-    if (!pSrcPix && pExaScr->info->UploadToScratch)
-    {
-	pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
-	if ((*pExaScr->info->UploadToScratch) (pSrcPix, &scratch))
-	    pSrcPix = &scratch;
-    }
-
     if (!pSrcPix)
 	return 0;
 
@@ -623,7 +615,6 @@ exaTryDriverComposite(CARD8		op,
     int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
     PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
     ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix;
-    struct _Pixmap scratch;
     ExaMigrationRec pixmaps[3];
 
     pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
@@ -702,16 +693,6 @@ exaTryDriverComposite(CARD8		op,
 	return 0;
     }
 
-    if (!pSrcPix && (!pMask || pMaskPix) && pExaScr->info->UploadToScratch) {
-	pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
-	if ((*pExaScr->info->UploadToScratch) (pSrcPix, &scratch))
-	    pSrcPix = &scratch;
-    } else if (pSrcPix && pMask && !pMaskPix && pExaScr->info->UploadToScratch) {
-	pMaskPix = exaGetDrawablePixmap (pMask->pDrawable);
-	if ((*pExaScr->info->UploadToScratch) (pMaskPix, &scratch))
-	    pMaskPix = &scratch;
-    }
-
     if (!pSrcPix || (pMask && !pMaskPix)) {
 	REGION_UNINIT(pDst->pDrawable->pScreen, &region);
 	return 0;
-- 
1.6.2.rc1



-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list