uxa: Increase amount of composite fallback verbage

The fallback log for http://bugs.freedesktop.org/show_bug.cgi?id=26189
does not actually state the reason why we actually fallback. This is
possibly because we need to fallback for reasons other than the
operation cannot be performed in hardware -- such as using an alpha map
or the screen is swapped out, so add this information to the fallback
log.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-01-24 09:02:05 +00:00
parent 93cd943d41
commit 326fe00df4
1 changed files with 21 additions and 10 deletions

View File

@ -80,17 +80,22 @@ static void uxa_composite_fallback_pict_desc(PicturePtr pict, char *string,
snprintf(size, 20, "%dx%d%s", pict->pDrawable->width,
pict->pDrawable->height, pict->repeat ? " R" : "");
snprintf(string, n, "%p:%c fmt %s (%s)", pict->pDrawable, loc, format,
size);
snprintf(string, n, "%p:%c fmt %s (%s)%s",
pict->pDrawable, loc, format, size,
pict->alphaMap ? " with alpha map" :"");
}
static void
uxa_print_composite_fallback(CARD8 op,
uxa_print_composite_fallback(const char *func, CARD8 op,
PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst)
{
uxa_screen_t *uxa_screen = uxa_get_screen(pDst->pDrawable->pScreen);
char sop[20];
char srcdesc[40], maskdesc[40], dstdesc[40];
if (! uxa_screen->fallback_debug)
return;
switch (op) {
case PictOpSrc:
sprintf(sop, "Src");
@ -107,11 +112,14 @@ uxa_print_composite_fallback(CARD8 op,
uxa_composite_fallback_pict_desc(pMask, maskdesc, 40);
uxa_composite_fallback_pict_desc(pDst, dstdesc, 40);
ErrorF("Composite fallback: op %s, \n"
" src %s, \n"
" mask %s, \n"
" dst %s, \n",
sop, srcdesc, maskdesc, dstdesc);
ErrorF("Composite fallback at %s:\n"
" op %s, \n"
" src %s, \n"
" mask %s, \n"
" dst %s, \n"
" screen %s\n",
func, sop, srcdesc, maskdesc, dstdesc,
uxa_screen->swappedOut ? "swapped out" : "normal");
}
Bool uxa_op_reads_destination(CARD8 op)
@ -704,6 +712,9 @@ uxa_composite_rects(CARD8 op,
ValidatePicture(pDst);
if (uxa_try_driver_composite_rects(op, pSrc, pDst, nrect, rects) != 1) {
uxa_print_composite_fallback("uxa_composite_rects",
op, pSrc, NULL, pDst);
n = nrect;
r = rects;
while (n--) {
@ -1115,8 +1126,8 @@ composite:
}
fallback:
if (uxa_screen->fallback_debug)
uxa_print_composite_fallback(op, pSrc, pMask, pDst);
uxa_print_composite_fallback("uxa_composite",
op, pSrc, pMask, pDst);
uxa_check_composite(op, pSrc, pMask, pDst, xSrc, ySrc,
xMask, yMask, xDst, yDst, width, height);