EXA: Finish access to pixmap if it's prepared at destruction time.

Previously we assumed every pixmap destroyed during a software fallback was
also created during a software fallback and had access prepared, but that's
not always true.

Fixes a server abort
Reported-by: 邓逸昕 <bupt.dengyixin@gmail.com>

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Michel Dänzer 2010-07-13 14:56:53 +02:00 • committed by Keith Packard
commit 0540c46066
5 changed files with 29 additions and 9 deletions

View file

@ -245,9 +245,7 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
{
ExaPixmapPriv (pPixmap);
/* During a fallback we must finish access, but we don't know the index. */
if (pExaScr->fallback_counter)
exaFinishAccess(&pPixmap->drawable, -1);
exaDestroyPixmap(pPixmap);
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;