[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pixman: Changes to 'upstream-unstable'



 CODING_STYLE                          |  216 
 COPYING                               |   39 
 Makefile.am                           |    6 
 README                                |    2 
 RELEASING                             |    9 
 TODO                                  |    2 
 configure.ac                          |  203 
 pixman/Makefile.am                    |  103 
 pixman/Makefile.win32                 |   57 
 pixman/combine.h.inc                  |  213 
 pixman/combine.inc                    | 1269 -----
 pixman/combine.pl                     |   81 
 pixman/make-combine.pl                |   86 
 pixman/pixman-access.c                | 3190 ++++++++-----
 pixman/pixman-accessor.h              |   40 
 pixman/pixman-arm-detect-win32.asm    |   21 
 pixman/pixman-arm-neon.c              | 2781 ++++++++++++
 pixman/pixman-arm-simd.c              |  555 +-
 pixman/pixman-arm-simd.h              |   94 
 pixman/pixman-bits-image.c            |  772 +++
 pixman/pixman-combine.c.template      | 2436 ++++++++++
 pixman/pixman-combine.h.template      |  226 
 pixman/pixman-compiler.h              |   71 
 pixman/pixman-compose-accessors.c     |    4 
 pixman/pixman-compose.c               |  596 --
 pixman/pixman-compute-region.c        |  242 -
 pixman/pixman-conical-gradient.c      |  180 
 pixman/pixman-cpu.c                   |  585 ++
 pixman/pixman-edge-imp.h              |   92 
 pixman/pixman-edge.c                  |  360 -
 pixman/pixman-fast-path.c             | 1440 ++++++
 pixman/pixman-general.c               |  324 +
 pixman/pixman-gradient-walker.c       |  254 +
 pixman/pixman-image.c                 |  740 +--
 pixman/pixman-implementation.c        |  268 +
 pixman/pixman-linear-gradient.c       |  294 +
 pixman/pixman-matrix.c                | 1010 ++--
 pixman/pixman-mmx.c                   | 3097 +++++++------
 pixman/pixman-mmx.h                   |  320 -
 pixman/pixman-pict.c                  | 2400 ----------
 pixman/pixman-private.h               | 1269 ++---
 pixman/pixman-radial-gradient.c       |  368 +
 pixman/pixman-region.c                | 2521 ++++++----
 pixman/pixman-region16.c              |   46 
 pixman/pixman-region32.c              |   30 
 pixman/pixman-solid-fill.c            |   91 
 pixman/pixman-source.c                |  709 ---
 pixman/pixman-sse2.c                  | 7819 +++++++++++++++++++---------------
 pixman/pixman-sse2.h                  |  358 -
 pixman/pixman-timer.c                 |   20 
 pixman/pixman-transformed-accessors.c |    3 
 pixman/pixman-transformed.c           |  615 --
 pixman/pixman-trap.c                  |  416 +
 pixman/pixman-utils.c                 | 1142 +++-
 pixman/pixman-vmx.c                   | 1815 +++++--
 pixman/pixman-vmx.h                   |  308 -
 pixman/pixman-x64-mmx-emulation.h     |  263 +
 pixman/pixman.c                       |  543 ++
 pixman/pixman.h                       |  509 +-
 pixman/refactor                       |  478 ++
 pixman/solaris-hwcap.mapfile          |   36 
 test/Makefile.am                      |   67 
 test/alpha-test.c                     |  117 
 test/blitters-test-bisect.rb          |   43 
 test/blitters-test.c                  |  655 ++
 test/clip-in.c                        |   50 
 test/clip-test.c                      |   70 
 test/composite-test.c                 |  212 
 test/convolution-test.c               |   47 
 test/fetch-test.c                     |   20 
 test/gradient-test.c                  |  102 
 test/oob-test.c                       |  101 
 test/region-test.c                    |   63 
 test/scaling-test-bisect.rb           |   38 
 test/scaling-test.c                   |  474 ++
 test/screen-test.c                    |   44 
 test/trap-crasher.c                   |   27 
 test/trap-test.c                      |   49 
 test/utils.c                          |  113 
 test/utils.h                          |    6 
 test/window-test.c                    |  173 
 81 files changed, 28505 insertions(+), 18003 deletions(-)

New commits:
commit 601e4dc6fd78984701a231e48fabd1e1e3e23d38
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Mon Sep 28 09:20:13 2009 -0400

    Pre-release version bump

diff --git a/configure.ac b/configure.ac
index fbc73f6..a1c6949 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AC_PREREQ([2.57])
 
 m4_define([pixman_major], 0)
 m4_define([pixman_minor], 16)
-m4_define([pixman_micro], 1)
+m4_define([pixman_micro], 2)
 
 m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
 

commit b765dcb554e4328c8502433474a28af30c0bb7f3
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Mon Sep 28 08:59:11 2009 -0400

    Update CRC in blitters-test for the changes in 10bpc alpha handling

diff --git a/test/blitters-test.c b/test/blitters-test.c
index 6e1c5de..ba9900a 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -640,7 +640,7 @@ main (int argc, char *argv[])
 	    /* Predefined value for running with all the fastpath functions
 	       disabled. It needs to be updated every time when changes are
 	       introduced to this program or behavior of pixman changes! */
-	    if (crc == 0xFE1244BF)
+	    if (crc == 0x06D8EDB6)
 	    {
 		printf ("blitters test passed\n");
 	    }

commit 66f7581ccf8157777c9bfc0116858adb140ee4ca
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Sat Sep 26 13:12:14 2009 -0400

    Fix fetch-test for big-endian systems.
    
    Data narrower than 32bpp should be stored in the correct
    endian. Reported by Andrea Canciani.

diff --git a/test/fetch-test.c b/test/fetch-test.c
index c41f1a6..6306a4c 100644
--- a/test/fetch-test.c
+++ b/test/fetch-test.c
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "pixman.h"
+#include <config.h>
 
 #define SIZE 1024
 
@@ -34,8 +35,13 @@ testcase_t testcases[] = {
 	.format = PIXMAN_g1,
 	.width = 8, .height = 2,
 	.stride = 4,
+#ifdef WORDS_BIGENDIAN
+	.src = { 0xaa000000,
+		 0x55000000 },
+#else
 	.src = { 0x00000055, 
 	         0x000000aa },
+#endif
 	.dst = { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000,
 	         0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff },
 	.indexed = &mono_pallete,
@@ -51,14 +57,24 @@ testcase_t testcases[] = {
 	         0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, },
     },
 #endif
+    /* FIXME: make this work on big endian */
     {
 	.format = PIXMAN_yv12,
 	.width = 8, .height = 2,
 	.stride = 8,
+#ifdef WORDS_BIGENDIAN
+	.src = { 0x00ff00ff, 0x00ff00ff, 
+	         0xff00ff00, 0xff00ff00, 
+	         0x80ff8000, 
+		 0x800080ff
+	},
+#else
 	.src = { 0xff00ff00, 0xff00ff00, 
 	         0x00ff00ff, 0x00ff00ff, 
 	         0x0080ff80, 
-		 0xff800080},
+		 0xff800080
+	 },
+#endif
 	.dst = { 
 		0xff000000, 0xffffffff, 0xffb80000, 0xffffe113,
 		0xff000000, 0xffffffff, 0xff0023ee, 0xff4affff,

commit 485c1f54b4abb2e1677627b713e086b45ca63eea
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Fri Sep 18 08:16:56 2009 -0400

    Fix bug in blitters-test with BGRA formats.
    
    When masking out the x bits, blitter-test would make the incorrect
    assumption that the they were always in the topmost position. This is
    not correct for formats of type PIXMAN_TYPE_BGRA.

diff --git a/test/blitters-test.c b/test/blitters-test.c
index 23de6c2..6e1c5de 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -314,6 +314,9 @@ free_random_image (uint32_t initcrc,
 	    uint32_t *data = pixman_image_get_data (img);
 	    uint32_t mask = (1 << PIXMAN_FORMAT_DEPTH (fmt)) - 1;
 
+	    if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA)
+		mask <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt));
+
 	    for (i = 0; i < 32; i++)
 		mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt));
 

commit 8f5cca82aca953ee4d87a7d576ff67ddcab85b6a
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Fri Sep 18 09:11:04 2009 -0400

    Fix alpha handling for 10 bpc formats.
    
    These generally extracted the 2 bits of alpha, then shifted them 62
    bits and replicated across 16 bits. Then they were shifted another 48
    bits, making the resulting alpha channel 0.

diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 532aa2e..d9fd38c 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -230,7 +230,7 @@ fetch_scanline_a2r10g10b10 (pixman_image_t *image,
     const uint32_t *pixel = bits + x;
     const uint32_t *end = pixel + width;
     uint64_t *buffer = (uint64_t *)b;
-    
+
     while (pixel < end)
     {
 	uint32_t p = READ (image, pixel++);
@@ -238,16 +238,16 @@ fetch_scanline_a2r10g10b10 (pixman_image_t *image,
 	uint64_t r = (p >> 20) & 0x3ff;
 	uint64_t g = (p >> 10) & 0x3ff;
 	uint64_t b = p & 0x3ff;
-	
+
 	r = r << 6 | r >> 4;
 	g = g << 6 | g >> 4;
 	b = b << 6 | b >> 4;
-	
-	a <<= 62;
+
+	a <<= 14;
 	a |= a >> 2;
 	a |= a >> 4;
 	a |= a >> 8;
-	
+
 	*buffer++ = a << 48 | r << 32 | g << 16 | b;
     }
 }
@@ -309,11 +309,11 @@ fetch_scanline_a2b10g10r10 (pixman_image_t *image,
 	g = g << 6 | g >> 4;
 	b = b << 6 | b >> 4;
 	
-	a <<= 62;
+	a <<= 14;
 	a |= a >> 2;
 	a |= a >> 4;
 	a |= a >> 8;
-	
+
 	*buffer++ = a << 48 | r << 32 | g << 16 | b;
     }
 }
@@ -1115,18 +1115,18 @@ fetch_scanline_yv12 (pixman_image_t *image,
     {
 	int16_t y, u, v;
 	int32_t r, g, b;
-	
+
 	y = y_line[x + i] - 16;
 	u = u_line[(x + i) >> 1] - 128;
 	v = v_line[(x + i) >> 1] - 128;
-	
+
 	/* R = 1.164(Y - 16) + 1.596(V - 128) */
 	r = 0x012b27 * y + 0x019a2e * v;
 	/* G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128) */
 	g = 0x012b27 * y - 0x00d0f2 * v - 0x00647e * u;
 	/* B = 1.164(Y - 16) + 2.018(U - 128) */
 	b = 0x012b27 * y + 0x0206a2 * u;
-	
+
 	*buffer++ = 0xff000000 |
 	    (r >= 0 ? r < 0x1000000 ? r         & 0xff0000 : 0xff0000 : 0) |
 	    (g >= 0 ? g < 0x1000000 ? (g >> 8)  & 0x00ff00 : 0x00ff00 : 0) |
@@ -1148,16 +1148,16 @@ fetch_pixel_a2r10g10b10 (bits_image_t *image,
     uint64_t r = (p >> 20) & 0x3ff;
     uint64_t g = (p >> 10) & 0x3ff;
     uint64_t b = p & 0x3ff;
-    
+
     r = r << 6 | r >> 4;
     g = g << 6 | g >> 4;
     b = b << 6 | b >> 4;
-    
-    a <<= 62;
+
+    a <<= 14;
     a |= a >> 2;
     a |= a >> 4;
     a |= a >> 8;
-    
+
     return a << 48 | r << 32 | g << 16 | b;
 }
 
@@ -1197,7 +1197,7 @@ fetch_pixel_a2b10g10r10 (bits_image_t *image,
     g = g << 6 | g >> 4;
     b = b << 6 | b >> 4;
     
-    a <<= 62;
+    a <<= 14;
     a |= a >> 2;
     a |= a >> 4;
     a |= a >> 8;

commit 09a71a0dc0937264f456c246dc98830f942a6479
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Thu Sep 24 05:22:33 2009 -0400

    Return result from pixman_image_set_transform().
    
    Previously it would always return TRUE, even when malloc() had failed.

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index 5831953..bba5fd6 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -312,7 +312,7 @@ pixman_image_set_transform (pixman_image_t *          image,
     {
 	{ { pixman_fixed_1, 0, 0 },
 	  { 0, pixman_fixed_1, 0 },
-	  { 0, 0, pixman_fixed_1 }}
+	  { 0, 0, pixman_fixed_1 } }
     };
 
     image_common_t *common = (image_common_t *)image;
@@ -342,10 +342,12 @@ pixman_image_set_transform (pixman_image_t *          image,
 
     memcpy (common->transform, transform, sizeof(pixman_transform_t));
 
+    result = TRUE;
+
 out:
     image_property_changed (image);
 
-    return TRUE;
+    return result;
 }
 
 PIXMAN_EXPORT void

commit 8138f908aa10e5581f83ebfb5f53d81ad39437bd
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Tue Sep 15 07:43:23 2009 -0400

    Revert "Enable component alpha on solid masks."
    
    For consistency we will probably want to allow component alpha to be
    set on all masks at some point, but not in the stable branch, and this
    commit only enabled it for solid images anyway.
    
    This reverts commit 29e22cf38e8abc54b9dddbdeb3909d02866a82a0.

diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
index 5c40103..3ead3da 100644
--- a/pixman/pixman-general.c
+++ b/pixman/pixman-general.c
@@ -159,9 +159,9 @@ general_composite_rect  (pixman_implementation_t *imp,
         fetch_src                       &&
         fetch_mask                      &&
         mask                            &&
-        mask->common.component_alpha	&&
-        (mask->common.type == SOLID ||
-	 (mask->common.type == BITS && PIXMAN_FORMAT_RGB (mask->bits.format)));
+        mask->common.type == BITS       &&
+        mask->common.component_alpha    &&
+        PIXMAN_FORMAT_RGB (mask->bits.format);
 
     if (wide)
     {

commit 77627554bcc81f4aa3cb81f8158075aa6f20eca1
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Thu Sep 10 21:33:24 2009 -0400

    Fix off-by-one error in source_image_needs_out_of_bounds_workaround()
    
    If extents->x2/y2 are equal to image->width/height, then the clip is
    still inside the drawable, so no workaround is necessary.

diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 6b80189..4e78ce1 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -612,14 +612,14 @@ source_image_needs_out_of_bounds_workaround (bits_image_t *image)
     {
 	if (!image->common.client_clip)
 	{
-	    /* There is no client clip, so the drawable in question
-	     * is a window if the clip region extends beyond the
-	     * drawable geometry.
+	    /* There is no client clip, so if the clip region extends beyond the
+	     * drawable geometry, it must be because the X server generated the
+	     * bogus clip region.
 	     */
 	    const pixman_box32_t *extents = pixman_region32_extents (&image->common.clip_region);
 
-	    if (extents->x1 >= 0 && extents->x2 < image->width &&
-		extents->y1 >= 0 && extents->y2 < image->height)
+	    if (extents->x1 >= 0 && extents->x2 <= image->width &&
+		extents->y1 >= 0 && extents->y2 <= image->height)
 	    {
 		return FALSE;
 	    }

commit c31cd73a09616cdec9bd91800d9410ba1f8adf09
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Mon Sep 14 18:48:32 2009 -0400

    Remove optimization for 0xffffffff and 0xff the add_n_8888_8888_ca fast path
    
    This is an ADD operation, not an OVER. Fixes bug 23934, reported by
    Siarhei Siamashka.

diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 7f80578..5ab8d8c 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -389,15 +389,11 @@ fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp,
 	{
 	    ma = *mask++;
 
-	    if (ma == 0xffffffff && srca == 0xff)
-	    {
-		*dst = src;
-	    }
-	    else if (ma)
+	    if (ma)
 	    {
 		d = *dst;
 		s = src;
-		
+
 		UN8x4_MUL_UN8x4_ADD_UN8x4 (s, ma, d);
 
 		*dst = s;

commit 8035df8bcb01c2df42b8adf8b96c7ac796f384cc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Aug 16 12:16:46 2009 +0100

    Remove duplicated declaration
    
    The pixman_tranform_pixman_f_transform() declaration is repeated 4 lines
    down.

diff --git a/pixman/pixman.h b/pixman/pixman.h
index 969d427..5b90a0c 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -222,8 +222,6 @@ pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform
 							const struct pixman_f_transform *ft);
 void          pixman_f_transform_from_pixman_transform (struct pixman_f_transform       *ft,
 							const struct pixman_transform   *t);
-pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform         *t,
-							const struct pixman_f_transform *ft);
 pixman_bool_t pixman_f_transform_invert                (struct pixman_f_transform       *dst,
 							const struct pixman_f_transform *src);
 pixman_bool_t pixman_f_transform_point                 (const struct pixman_f_transform *t,

commit 29e22cf38e8abc54b9dddbdeb3909d02866a82a0
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 13 16:26:29 2009 +0100

    Enable component alpha on solid masks.

diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
index 3ead3da..5c40103 100644
--- a/pixman/pixman-general.c
+++ b/pixman/pixman-general.c
@@ -159,9 +159,9 @@ general_composite_rect  (pixman_implementation_t *imp,
         fetch_src                       &&
         fetch_mask                      &&
         mask                            &&
-        mask->common.type == BITS       &&
-        mask->common.component_alpha    &&
-        PIXMAN_FORMAT_RGB (mask->bits.format);
+        mask->common.component_alpha	&&
+        (mask->common.type == SOLID ||
+	 (mask->common.type == BITS && PIXMAN_FORMAT_RGB (mask->bits.format)));
 
     if (wide)
     {

commit 9fe2628702785e8db45593709c0aec54043a50e7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 13 16:26:52 2009 +0100

    [sse2] Bit-reversing typo: src != dst

diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index a5fcf21..bb74882 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -5606,7 +5606,7 @@ static const pixman_fast_path_t sse2_fast_paths[] =
     { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8,       PIXMAN_x8r8g8b8, sse2_composite_over_x888_8_8888,    0 },
     { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8,       PIXMAN_a8r8g8b8, sse2_composite_over_x888_8_8888,    0 },
     { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8,       PIXMAN_x8b8g8r8, sse2_composite_over_x888_8_8888,    0 },
-    { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8,       PIXMAN_a8r8g8b8, sse2_composite_over_x888_8_8888,    0 },
+    { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8,       PIXMAN_a8b8g8r8, sse2_composite_over_x888_8_8888,    0 },
 #endif
     { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8,       PIXMAN_a8r8g8b8, sse2_composite_over_x888_n_8888,    NEED_SOLID_MASK },
     { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8,       PIXMAN_x8r8g8b8, sse2_composite_over_x888_n_8888,    NEED_SOLID_MASK },

commit 2186bc89486f9f11161b0db280a869c6849c867e
Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date:   Fri Sep 4 14:14:00 2009 +0300

    Change CFLAGS order for PPC and ARM configure tests
    
    CFLAGS are always appended to the end of gcc options when compiling
    sources in autotools based projects. Configure tests should do the
    same. Otherwise build fails on PPC when using CFLAGS="-O2 -mno-altivec"
    for example. Similar problem affects ARM.

diff --git a/configure.ac b/configure.ac
index 061a380..fbc73f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -318,7 +318,7 @@ fi
 have_vmx_intrinsics=no
 AC_MSG_CHECKING(whether to use VMX/Altivec intrinsics)
 xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $VMX_CFLAGS"
+CFLAGS="$VMX_CFLAGS $CFLAGS"
 AC_COMPILE_IFELSE([
 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
 error "Need GCC >= 3.4 for sane altivec support"
@@ -362,7 +362,7 @@ ARM_SIMD_CFLAGS="-mcpu=arm1136j-s"
 have_arm_simd=no
 AC_MSG_CHECKING(whether to use ARM SIMD assembler)
 xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $ARM_SIMD_CFLAGS"
+CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS"
 AC_COMPILE_IFELSE([
 int main () {
     asm("uqadd8 r1, r1, r2");
@@ -401,7 +401,7 @@ ARM_NEON_CFLAGS="-mfpu=neon -mcpu=cortex-a8"
 have_arm_neon=no
 AC_MSG_CHECKING(whether to use ARM NEON)
 xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $ARM_NEON_CFLAGS"
+CFLAGS="$ARM_NEON_CFLAGS $CFLAGS"
 AC_COMPILE_IFELSE([
 #include <arm_neon.h>
 int main () {

commit 15304e3cddd6568ba6d5d1d3030568c3db7b05cc
Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date:   Wed Sep 2 19:46:47 2009 +0300

    ARM: Remove fallback to ARMv6 implementation from NEON delegate chain
    
    This can help to fix build problems with '-mthumb' gcc option in CFLAGS.
    ARMv6 optimized code can't be compiled for thumb (because of its inline
    assembly) and gets automatically disabled in configure. Reference
    to it from NEON optimized code resulted in linking problems.
    
    Every ARMv6 optimized fast path function also has a better NEON
    counterpart, so there is no need to fallback to ARMv6. Shorter
    delegate chain should additionally result in a bit better performance.

diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 3e7f566..8a2d72e 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -2767,8 +2767,8 @@ arm_neon_fill (pixman_implementation_t *imp,
 pixman_implementation_t *
 _pixman_implementation_create_arm_neon (void)
 {
-    pixman_implementation_t *simd = _pixman_implementation_create_arm_simd ();
-    pixman_implementation_t *imp = _pixman_implementation_create (simd);
+    pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
+    pixman_implementation_t *imp = _pixman_implementation_create (general);
 
     imp->composite = arm_neon_composite;
 #if 0 /* this code has some bugs */

commit 61b616067c3e8b2ff84fbf57f479a90cc9fa5344
Author: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Date:   Mon Aug 31 23:02:53 2009 +0100

    Default to optimised builds when using a Sun Studio compiler.
    
    Autoconf's AC_PROG_CC sets the default CFLAGS to -O2 -g for
    gcc and -g for every other compiler.  This patch defaults
    CFLAGS to the equivalent -O -g when we're using Sun Studio's cc
    if the user or site admin hasn't already set CFLAGS.

diff --git a/configure.ac b/configure.ac
index 02f8057..061a380 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,8 @@ AM_CONFIG_HEADER(config.h)
 
 AC_CANONICAL_HOST
 
+test_CFLAGS=${CFLAGS+set} # We may override autoconf default CFLAGS.
+
 AC_PROG_CC
 AC_PROG_LIBTOOL
 AC_CHECK_FUNCS([getisax])
@@ -75,6 +77,16 @@ AC_C_INLINE
 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
 
+# Default CFLAGS to -O -g rather than just the -g from AC_PROG_CC
+# if we're using Sun Studio and neither the user nor a config.site
+# has set CFLAGS.
+if test $SUNCC = yes &&			\
+   test "$test_CFLAGS" == "" &&		\
+   test "$CFLAGS" = "-g"
+then
+  CFLAGS="-O -g"
+fi
+
 # 
 # We ignore pixman_major in the version here because the major version should
 # always be encoded in the actual library name. Ie., the soname is:

commit 20acda6fde8441e18aab33980a33b099a16063eb
Author: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Date:   Mon Aug 31 20:27:32 2009 +0100

    Work around a Sun Studio 12 code generation bug involving _mm_set_epi32().
    
    Calling a static function wrapper around _mm_set_epi32() when not
    using optimisation causes Sun Studio 12's cc to emit a spurious
    floating point load which confuses the assembler.  Using a macro wrapper
    rather than a function steps around the problem.

diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 1d4f02b..a5fcf21 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -2628,12 +2628,18 @@ create_mask_2x32_64 (uint32_t mask0,
     return _mm_set_pi32 (mask0, mask1);
 }
 
+/* Work around a code generation bug in Sun Studio 12. */
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+# define create_mask_2x32_128(mask0, mask1) \
+	(_mm_set_epi32 ((mask0), (mask1), (mask0), (mask1)))
+#else
 static force_inline __m128i
 create_mask_2x32_128 (uint32_t mask0,
                       uint32_t mask1)
 {
     return _mm_set_epi32 (mask0, mask1, mask0, mask1);
 }
+#endif
 
 /* SSE2 code patch for fbcompose.c */
 

commit e30c0037d44bf76a26182080be24c7037d7be5b5
Author: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Date:   Mon Aug 31 20:24:04 2009 +0100

    Work around differing _mm_prefetch() prototypes on Solaris.
    
    Sun Studio 12 expects the address to prefetch to be
    a const char pointer rather than a __m128i pointer or
    void pointer.

diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 727ad42..1d4f02b 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -359,13 +359,13 @@ in_over_2x128 (__m128i* src_lo,
 static force_inline void
 cache_prefetch (__m128i* addr)
 {
-    _mm_prefetch (addr, _MM_HINT_T0);
+    _mm_prefetch ((void const*)addr, _MM_HINT_T0);
 }
 
 static force_inline void
 cache_prefetch_next (__m128i* addr)
 {
-    _mm_prefetch (addr + 4, _MM_HINT_T0); /* 64 bytes ahead */
+    _mm_prefetch ((void const *)(addr + 4), _MM_HINT_T0); /* 64 bytes ahead */
 }
 
 /* load 4 pixels from a 16-byte boundary aligned address */

commit 698b686d58c510e1b8a9183750d00cbd9ed504b2
Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date:   Fri Aug 28 22:34:21 2009 +0300

    ARM: workaround for gcc bug in vshll_n_u8 intrinsic
    
    Some versions of gcc (cs2009q1, 4.4.1) incorrectly reject
    shift operand having value >= 8, claiming that it is out of
    range. So inline assembly is used as a workaround.

diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 4125d1b..3e7f566 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -64,6 +64,12 @@ unpack0565 (uint16x8_t rgb)
     return res;
 }
 
+#ifdef USE_GCC_INLINE_ASM
+/* Some versions of gcc have problems with vshll_n_u8 intrinsic (Bug 23576) */
+#define vshll_n_u8(a, n) ({ uint16x8_t r; \
+    asm ("vshll.u8 %q0, %P1, %2\n" : "=w" (r) : "w" (a), "i" (n)); r; })
+#endif
+
 static force_inline uint16x8_t
 pack0565 (uint8x8x4_t s)
 {

commit b02b644d7017f794be2296c6354e44fd119d2477
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Wed Sep 2 16:09:32 2009 -0400

    Set version number to 0.16.1

diff --git a/configure.ac b/configure.ac
index 937fae7..02f8057 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AC_PREREQ([2.57])
 
 m4_define([pixman_major], 0)
 m4_define([pixman_minor], 16)
-m4_define([pixman_micro], 0)
+m4_define([pixman_micro], 1)
 
 m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
 

commit d465f854b3d5f2ffcc122aebfbead2d64cca7169
Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
Date:   Tue Sep 1 10:59:05 2009 +0900

    Add CPU detection for VC++ x64
    
    VC++ x64 has no inline assembler and x64 mode supports SSE2.
    So, it is unnecessary to call cpuid.

diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c
index a2a7b8a..5d5469b 100644
--- a/pixman/pixman-cpu.c
+++ b/pixman/pixman-cpu.c
@@ -325,7 +325,7 @@ pixman_have_arm_neon (void)
  * that would lead to SIGILL instructions on old CPUs that don't have
  * it.
  */
-#if !defined(__amd64__) && !defined(__x86_64__)
+#if !defined(__amd64__) && !defined(__x86_64__) && !defined(_M_AMD64)
 
 #ifdef HAVE_GETISAX
 #include <sys/auxv.h>

commit 57812465bf975e943e78d59dabbd5e6bb2ad87ef
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Fri Aug 28 07:55:30 2009 -0400

    Pre-release version bump

diff --git a/configure.ac b/configure.ac
index e6c5e8e..937fae7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ AC_PREREQ([2.57])
 #
 #   - Released development versions have an odd MINOR number
 #
-#   - Released stable versions have an event MINOR number
+#   - Released stable versions have an even MINOR number
 #
 #   - Versions that break ABI must have a new MAJOR number
 #
@@ -53,8 +53,8 @@ AC_PREREQ([2.57])
 #
 
 m4_define([pixman_major], 0)
-m4_define([pixman_minor], 15)
-m4_define([pixman_micro], 21)
+m4_define([pixman_minor], 16)
+m4_define([pixman_micro], 0)
 
 m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
 

commit 9e1a34a0d177e8c2381f419b0a04310da8cdde2b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 28 06:31:06 2009 -0400

    _pixman_run_fast_path: typo
    
    This is one example of a compiler warning that was lost amit the build
    noise.
    
    The error here is that in a list of required conditions we used ';'
    instead of '&&' with the result of continuing to use the fast-path
    even if we had a wide mask.
    
    Another error is that it was testing src, not mask as it should.

diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 961c6c6..7128206 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -670,15 +670,16 @@ _pixman_run_fast_path (const pixman_fast_path_t *paths,
 
     if (mask && has_fast_path)
     {
-	has_fast_path = mask->type == BITS &&
-	                !mask->common.transform &&
-	                !mask->common.alpha_map &&
-	                !mask->bits.read_func &&
-	                !mask->bits.write_func &&
-			 mask->common.filter != PIXMAN_FILTER_CONVOLUTION &&
-			 mask->common.repeat != PIXMAN_REPEAT_PAD &&
-			 mask->common.repeat != PIXMAN_REPEAT_REFLECT;
-	                !PIXMAN_FORMAT_IS_WIDE (src->bits.format);
+	has_fast_path =
+	    mask->type == BITS &&
+	    !mask->common.transform &&
+	    !mask->common.alpha_map &&
+	    !mask->bits.read_func &&
+	    !mask->bits.write_func &&
+	    mask->common.filter != PIXMAN_FILTER_CONVOLUTION &&
+	    mask->common.repeat != PIXMAN_REPEAT_PAD &&
+	    mask->common.repeat != PIXMAN_REPEAT_REFLECT &&
+	    !PIXMAN_FORMAT_IS_WIDE (mask->bits.format);
     }
 
     if (has_fast_path)

commit 83d607cbf1d3852f91b52a427bee30fffc3029e7
Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
Date:   Fri Aug 28 04:09:15 2009 -0400

    Remove spurious spaces in pixman-x64-mmx-emulation.h

diff --git a/pixman/pixman-x64-mmx-emulation.h b/pixman/pixman-x64-mmx-emulation.h
index 231030f..378019c 100644
--- a/pixman/pixman-x64-mmx-emulation.h
+++ b/pixman/pixman-x64-mmx-emulation.h
@@ -135,8 +135,8 @@ _m_paddusb (__m64 a, __m64 b)        /* unoptimized */
     unsigned long long y = ((M64U (a) >> 8) & 0x00FF00FF00FF00FFULL) +
                            ((M64U (b) >> 8) & 0x00FF00FF00FF00FFULL);
 
-    x | = ((x & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
-    y | = ((y & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
+    x |= ((x & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
+    y |= ((y & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
 
     x = (x & 0x00FF00FF00FF00FFULL) | ((y & 0x00FF00FF00FF00FFULL) << 8);
 
@@ -152,8 +152,8 @@ _m_paddusw (__m64 a, __m64 b)        /* unoptimized */
     unsigned long long y = ((M64U (a) >> 16) & 0x0000FFFF0000FFFFULL) +
                            ((M64U (b) >> 16) & 0x0000FFFF0000FFFFULL);
 
-    x | = ((x & 0xFFFF0000FFFF0000) >> 16) * 0xFFFF;
-    y | = ((y & 0xFFFF0000FFFF0000) >> 16) * 0xFFFF;
+    x |= ((x & 0xFFFF0000FFFF0000) >> 16) * 0xFFFF;
+    y |= ((y & 0xFFFF0000FFFF0000) >> 16) * 0xFFFF;
 
     x = (x & 0x0000FFFF0000FFFFULL) | ((y & 0x0000FFFF0000FFFFULL) << 16);
 

commit ce966f4d8e8aa9a4465e2ab28666bae891194a72
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Wed Aug 12 14:08:58 2009 -0400

    Check if we have posix_memalign() in configure.ac. [23260, 23261]
    
    Fall back to malloc() in blitters-test.c if we don't.

diff --git a/configure.ac b/configure.ac
index 6f9f600..e6c5e8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -490,6 +490,14 @@ AC_SUBST(GTK_LIBS)
 AC_SUBST(DEP_CFLAGS)
 AC_SUBST(DEP_LIBS)
 
+dnl =====================================
+dnl posix_memalign 
+
+AC_CHECK_FUNC(posix_memalign, have_posix_memalign=yes, have_posix_memalign=no)
+if test x$have_posix_memalign = xyes; then
+   AC_DEFINE(HAVE_POSIX_MEMALIGN, 1, [Whether we have posix_memalign()])
+fi
+
 AC_OUTPUT([pixman-1.pc
            pixman-1-uninstalled.pc
            Makefile
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 4838e81..23de6c2 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -24,7 +24,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <malloc.h>
+#include <config.h>
 #include "pixman.h"
 
 /* A primitive pseudorandom number generator, taken from POSIX.1-2001 example */
@@ -50,6 +50,20 @@ lcg_rand_n (int max)
     return lcg_rand () % max;
 }
 
+static void *
+aligned_malloc (size_t align, size_t size)
+{
+    void *result;
+
+#ifdef HAVE_POSIX_MEMALIGN
+    posix_memalign (&result, align, size);
+#else
+    result = malloc (size);
+#endif
+
+    return result;
+}
+
 /*----------------------------------------------------------------------------*\
  *  CRC-32 version 2.0.0 by Craig Bruce, 2006-04-29.
  *
@@ -259,7 +273,7 @@ create_random_image (pixman_format_code_t *allowed_formats,
     stride = (stride + 3) & ~3;
 
     /* do the allocation */
-    buf = (uint32_t *)memalign (64, stride * height);
+    buf = aligned_malloc (64, stride * height);
 
     /* initialize image with random data */
     for (i = 0; i < stride * height; i++)

commit 29c2ae4a0cf924cb011467687a4c43237fb2316c
Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date:   Wed Aug 12 20:22:24 2009 +0300

    ARM: a fix to pass blitters-test for 'neon_composite_over_n_8_0565'
    
    Inline assembly for handling <8 pixels width did not pass blitters-test.
    Fortunately gcc has no problems compiling alternative implementation
    which is using RVCT style intrinsics, so it can be used instead.

diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 14f7482..4125d1b 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -835,7 +835,7 @@ neon_composite_over_n_8_0565 (pixman_implementation_t * impl,
 	    w = width;
 
 
-#ifndef USE_GCC_INLINE_ASM
+#if 1 /* #ifndef USE_GCC_INLINE_ASM */
 	    uint8x8_t alpha;
 	    uint16x8_t dval, temp;
 	    uint8x8x4_t sval8temp;
@@ -872,6 +872,7 @@ neon_composite_over_n_8_0565 (pixman_implementation_t * impl,
 	    if (w&4)
 		vst1q_lane_u64 ((void *)dst4, vreinterpretq_u64_u16 (temp),1);
 #else
+	    /* this code has some bug (does not pass blitters-test) */
 	    asm volatile (
 		"vdup.32      d0, %[src]\n\t"
 		"vdup.8       d1, d0[1]\n\t"

commit ed4598f08a359346d14fe5b2bbb7b74c40332b18
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Tue Aug 11 14:03:24 2009 -0400

    Post-release version bump

diff --git a/configure.ac b/configure.ac
index c653a20..6f9f600 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AC_PREREQ([2.57])
 
 m4_define([pixman_major], 0)


Reply to: