st/xorg: Add support for EXA_MIXED_PIXMAPS and EXA_SUPPORTS_PREPARE_AUX.

Also make sure not to leak malloced memory when switching pixmaps to texture
based.
This commit is contained in:
Michel Dänzer 2009-09-08 18:08:24 +02:00
parent 2c307c7750
commit e34ea368d9
2 changed files with 10 additions and 0 deletions

View File

@ -118,6 +118,7 @@ driDoCreateBuffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int format)
}
if (!tex) {
exaMoveInPixmap(private->pPixmap);
xorg_exa_set_shared_usage(private->pPixmap);
pScreen->ModifyPixmapHeader(private->pPixmap, 0, 0, 0, 0, 0, NULL);
tex = xorg_exa_get_texture(private->pPixmap);

View File

@ -563,6 +563,9 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
pPixmap->devKind, 0, 0);
exa->scrn->transfer_unmap(exa->scrn, transfer);
exa->scrn->tex_transfer_destroy(transfer);
xfree(pPixmap->devPrivate.ptr);
pPixmap->devPrivate.ptr = NULL;
}
}
#ifdef DRM_MODE_FEATURE_DIRTYFB
@ -645,6 +648,12 @@ xorg_exa_init(ScrnInfoPtr pScrn)
pExa->pixmapOffsetAlign = 0;
pExa->pixmapPitchAlign = 1;
pExa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_HANDLES_PIXMAPS;
#ifdef EXA_SUPPORTS_PREPARE_AUX
pExa->flags |= EXA_SUPPORTS_PREPARE_AUX;
#endif
#ifdef EXA_MIXED_PIXMAPS
pExa->flags |= EXA_MIXED_PIXMAPS;
#endif
pExa->maxX = 8191; /* FIXME */
pExa->maxY = 8191; /* FIXME */