summaryrefslogtreecommitdiff
path: root/uxa/uxa-render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-01-24 09:02:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-01-24 09:02:05 +0000
commit326fe00df4160fbc3513ddbedfec90bdb2d7101b (patch)
tree9eb88cfd0cd1159726685b36c603f5be148a5598 /uxa/uxa-render.c
parent93cd943d41c646c794b8cb5a960d8f0805e15395 (diff)
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>
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r--uxa/uxa-render.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 525f75bb..38b9bb2a 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -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);