xf86-video-intel: 2 commits - uxa/uxa-render.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Jan 24 01:06:39 PST 2010
uxa/uxa-render.c | 43 +++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
New commits:
commit 31bbd7f919f4f1f545dd49861c15e60561c075cb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Jan 24 09:04:16 2010 +0000
uxa/uxa-render: Always remove useless repeats during composite.
I added a jump if there was no src or mask Drawable, but we do actually
need to check for useless src repeats even if we have a source-only
mask.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 38b9bb2..9ccc755 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -968,14 +968,11 @@ uxa_composite(CARD8 op,
if (uxa_screen->swappedOut)
goto fallback;
- if (pSrc->pDrawable == NULL || (pMask && pMask->pDrawable == NULL))
- goto composite;
-
/* Remove repeat in source if useless */
- if (pSrc->repeat && (pSrc->pDrawable->width > 1 || pSrc->pDrawable->height > 1 ) &&
- !pSrc->transform && xSrc >= 0 &&
- (xSrc + width) <= pSrc->pDrawable->width && ySrc >= 0 &&
- (ySrc + height) <= pSrc->pDrawable->height)
+ if (pSrc->pDrawable && pSrc->repeat && !pSrc->transform &&
+ (pSrc->pDrawable->width > 1 || pSrc->pDrawable->height > 1) &&
+ xSrc >= 0 && (xSrc + width) <= pSrc->pDrawable->width &&
+ ySrc >= 0 && (ySrc + height) <= pSrc->pDrawable->height)
pSrc->repeat = 0;
if (!pMask) {
@@ -1079,7 +1076,6 @@ uxa_composite(CARD8 op,
}
}
-composite:
/* Remove repeat in mask if useless */
if (pMask && pMask->repeat && !pMask->transform && pMask->pDrawable &&
(pMask->pDrawable->width > 1 || pMask->pDrawable->height > 1) &&
commit 326fe00df4160fbc3513ddbedfec90bdb2d7101b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Jan 24 09:02:05 2010 +0000
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 at chris-wilson.co.uk>
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 525f75b..38b9bb2 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);
More information about the xorg-commit
mailing list