- Pass the right pixel mask (all ones) in to PrepareSolid in the

solid-fill-based composite acceleration.
- Use a real pixmap when doing an UploadToScratch (For pDrawable->type ==
    DRAWABLE_WINDOW, you need to get the backing pixmap).
- Pass back the x/y offsets from kaaGetOffscreenPixmap unconditionally,
    because they'll be used in the scratch case.
- Turn on the Render acceleration for Rage 128 and Radeon 100-series at
    last!
This commit is contained in:
Eric Anholt 2004-06-10 19:22:58 +00:00
parent c3bc6dd551
commit 4ffde8a6b3
3 changed files with 19 additions and 13 deletions

View File

@ -753,12 +753,12 @@ ATIDrawEnable(ScreenPtr pScreen)
/* We can't dispatch 3d commands in PIO mode. */
if (!atis->using_pio) {
if (0 && !atic->is_radeon) { /* XXX */
if (!atic->is_radeon) {
atis->kaa.CheckComposite = R128CheckComposite;
atis->kaa.PrepareComposite = R128PrepareComposite;
atis->kaa.Composite = R128Composite;
atis->kaa.DoneComposite = R128DoneComposite;
} else if (0 && atic->is_r100) { /* XXX */
} else if (atic->is_r100) {
atis->kaa.CheckComposite = R100CheckComposite;
atis->kaa.PrepareComposite = R100PrepareComposite;
atis->kaa.Composite = RadeonComposite;

View File

@ -336,13 +336,12 @@ kaaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
x = 0;
y = 0;
}
*xp = x;
*yp = y;
if (kaaPixmapIsOffscreen (pPixmap))
{
*xp = x;
*yp = y;
return pPixmap;
}
return NULL;
else
return NULL;
}
Bool

View File

@ -277,8 +277,7 @@ kaaTryDriverSolidFill(PicturePtr pSrc,
kaaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
pDst->format);
if (!(*pKaaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffff,
pixel))
if (!(*pKaaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel))
{
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return -1;
@ -451,12 +450,20 @@ kaaTryDriverComposite(CARD8 op,
}
if (!pSrcPix && (!pMask || pMaskPix) && pKaaScr->info->UploadToScratch) {
if ((*pKaaScr->info->UploadToScratch) ((PixmapPtr) pSrc->pDrawable,
&scratch))
if (pSrc->pDrawable->type == DRAWABLE_WINDOW)
pSrcPix = (*pSrc->pDrawable->pScreen->GetWindowPixmap) (
(WindowPtr) pSrc->pDrawable);
else
pSrcPix = (PixmapPtr) pSrc->pDrawable;
if ((*pKaaScr->info->UploadToScratch) (pSrcPix, &scratch))
pSrcPix = &scratch;
} else if (pSrcPix && pMask && !pMaskPix && pKaaScr->info->UploadToScratch) {
if ((*pKaaScr->info->UploadToScratch) ((PixmapPtr) pMask->pDrawable,
&scratch))
if (pMask->pDrawable->type == DRAWABLE_WINDOW)
pMaskPix = (*pMask->pDrawable->pScreen->GetWindowPixmap) (
(WindowPtr) pMask->pDrawable);
else
pMaskPix = (PixmapPtr) pMask->pDrawable;
if ((*pKaaScr->info->UploadToScratch) (pMaskPix, &scratch))
pMaskPix = &scratch;
}