From 95de0bc95788c05db2008061cabe47e1b33af86c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 25 Mar 2010 13:43:26 +0000 Subject: [PATCH] uxa: Add fallback warnings for PutImage. --- uxa/uxa-accel.c | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c index cd3e477..7fb4bf9 100644 --- a/uxa/uxa-accel.c +++ b/uxa/uxa-accel.c @@ -130,17 +130,37 @@ uxa_do_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int bpp = pDrawable->bitsPerPixel; /* Don't bother with under 8bpp, XYPixmaps. */ - if (format != ZPixmap || bpp < 8) + if (format != ZPixmap || bpp < 8) { + ScrnInfoPtr scrn = xf86Screens[pDrawable->pScreen->myNum]; + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "%s %p: format=%d, bpp=%d\n", __FUNCTION__, pDrawable, + format, bpp); return FALSE; + } /* Only accelerate copies: no rop or planemask. */ - if (!UXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy) + if (!UXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy) { + ScrnInfoPtr scrn = xf86Screens[pDrawable->pScreen->myNum]; + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "%s %p: solid=%d, alu=%d\n", __FUNCTION__, pDrawable, + UXA_PM_IS_SOLID(pDrawable, pGC->planemask), pGC->alu); return FALSE; + } - if (uxa_screen->swappedOut) + if (uxa_screen->swappedOut) { + ScrnInfoPtr scrn = xf86Screens[pDrawable->pScreen->myNum]; + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "%s %p: swapped out\n", __FUNCTION__, pDrawable); return FALSE; + } pPix = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff); + if (!pPix) { + ScrnInfoPtr scrn = xf86Screens[pDrawable->pScreen->myNum]; + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "%s %p: not offscreen pixmap\n", __FUNCTION__, pDrawable); + return FALSE; + } if (!pPix || !uxa_screen->info->put_image) return FALSE; -- 1.7.0.3