[cairo-commit] 2 commits - perf/cairo-perf-diff pixman/src
Carl Worth
cworth at kemper.freedesktop.org
Wed Apr 25 16:28:40 PDT 2007
perf/cairo-perf-diff | 14 +++++++++-----
pixman/src/fbmmx.c | 20 +++++++++-----------
pixman/src/fbpict.c | 8 +++-----
3 files changed, 21 insertions(+), 21 deletions(-)
New commits:
diff-tree 6035d3b47e635f53b361dc7924e161a214e038b3 (from 0a1d2070e252921e097fec89537537675f8b7161)
Author: Carl Worth <cworth at cworth.org>
Date: Wed Apr 25 16:28:14 2007 -0700
cairo-perf-diff: Repair command-line option parsing.
Apparently --force and --html have been broken since the attempt
to address --help in ef5611df6c6bc8d9c6877af3a59c66fa6fc5c13a .
diff --git a/perf/cairo-perf-diff b/perf/cairo-perf-diff
index c9ce23f..d834f25 100755
--- a/perf/cairo-perf-diff
+++ b/perf/cairo-perf-diff
@@ -48,11 +48,7 @@ END
exit 1
}
-# Yes, this ugly ad-hoc option parsing could be cleaned up
-if [ $# -eq 0 ] || [ "${1#-}" != "$1" ]; then
- usage
-fi
-
+# First, pull off any known options
while true; do
case $1 in
-f|--force) force_cairo_perf="true";;
@@ -63,6 +59,13 @@ while true; do
shift
done
+# Then if anything is left that still looks like an option, (begins
+# with a dash), give usage to catch --help or any other -garbage
+if [ $# -eq 0 ] || [ "${1#-}" != "$1" ]; then
+ usage
+fi
+
+# Finally, pick up the actual revision arguments
if [ $# -eq 1 ] || [ "$2" = "--" ]; then
old="$1^"
new="$1"
@@ -73,6 +76,7 @@ else
shift 2
fi
+# And post-finally, pass anything after -- on to cairo-perf
CAIRO_PERF_OPTIONS="-r -i 10"
if [ $# -gt 0 ]; then
if [ "$1" = "--" ]; then
diff-tree 0a1d2070e252921e097fec89537537675f8b7161 (from 342de46eb4033e1cccfec8b905c0002cc880c9fb)
Author: Jeff Muizelaar <jeff at infidigm.net>
Date: Wed Apr 25 16:01:29 2007 -0700
Fix bugs in fbCompositeSrc_8888x8x8888mmx and fbCompositeSrc_x888x8x8888mmx
And re-enable fbCompositeSrc_8888x8x8888mmx now that it should work.
This gives another little boost to the paint-with-alpha perf test:
image-rgba paint-with-alpha_image_rgba_over-512 11.76 -> 5.20: 1.85x speedup
â
image-rgb paint-with-alpha_image_rgba_over-512 11.76 -> 5.26: 1.84x speedup
â
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index dcb3786..57dcd14 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -1194,10 +1194,9 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
{
CARD32 *dstLine, *dst;
CARD32 *srcLine, *src;
- CARD8 *maskLine;
CARD32 mask;
__m64 vmask;
- FbStride dstStride, srcStride, maskStride;
+ FbStride dstStride, srcStride;
CARD16 w;
__m64 srca;
@@ -1205,9 +1204,9 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
- mask = *maskLine << 24 | *maskLine << 16 | *maskLine << 8 | *maskLine;
+ fbComposeGetSolid (pMask, pDst, mask);
+ mask = mask | mask >> 8 | mask >> 16 | mask >> 24;
vmask = load8888 (mask);
srca = MC(4x00ff);
@@ -1224,7 +1223,7 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
- *dst = store8888 (over (s, expand_alpha (s), d));
+ *dst = store8888 (in_over (s, expand_alpha (s), vmask, d));
w--;
dst++;
@@ -1233,8 +1232,8 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
while (w >= 2)
{
- __m64 vs = *(__m64 *)dst;
- __m64 vd = *(__m64 *)src;
+ __m64 vs = *(__m64 *)src;
+ __m64 vd = *(__m64 *)dst;
__m64 vsrc0 = expand8888 (vs, 0);
__m64 vsrc1 = expand8888 (vs, 1);
@@ -1279,10 +1278,9 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
{
CARD32 *dstLine, *dst;
CARD32 *srcLine, *src;
- CARD8 *maskLine;
CARD32 mask;
__m64 vmask;
- FbStride dstStride, srcStride, maskStride;
+ FbStride dstStride, srcStride;
CARD16 w;
__m64 srca;
@@ -1290,9 +1288,9 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
+ fbComposeGetSolid (pMask, pDst, mask);
- mask = *maskLine << 24 | *maskLine << 16 | *maskLine << 8 | *maskLine;
+ mask = mask | mask >> 8 | mask >> 16 | mask >> 24;
vmask = load8888 (mask);
srca = MC(4x00ff);
diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c
index 03f75f1..2d71402 100644
--- a/pixman/src/fbpict.c
+++ b/pixman/src/fbpict.c
@@ -1653,14 +1653,12 @@ pixman_composite (pixman_operator_t op,
pMask->format_code == PICT_a8 && fbHaveMMX())
func = fbCompositeSrc_x888x8x8888mmx;
break;
-#if 0 /* This case fails rendercheck for me */
case PICT_a8r8g8b8:
- if ((pDst->format == PICT_a8r8g8b8 ||
- pDst->format == PICT_x8r8g8b8) &&
- pMask->format == PICT_a8 && fbHaveMMX())
+ if ((pDst->format_code == PICT_a8r8g8b8 ||
+ pDst->format_code == PICT_x8r8g8b8) &&
+ pMask->format_code == PICT_a8 && fbHaveMMX())
func = fbCompositeSrc_8888x8x8888mmx;
break;
-#endif
case PICT_a8b8g8r8:
if ((pDst->format_code == PICT_a8b8g8r8 ||
pDst->format_code == PICT_x8b8g8r8) &&
More information about the cairo-commit
mailing list