pixman: Branch 'master' - 2 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Wed Jan 26 14:12:40 PST 2011


 configure.ac              |   23 +++++++++++++++++++++++
 pixman/pixman-arm-neon.c  |    7 +------
 pixman/pixman-arm-simd.c  |    5 ++---
 pixman/pixman-cpu.c       |   30 +++++++++++++++++++-----------
 pixman/pixman-fast-path.c |    5 ++---
 pixman/pixman-mmx.c       |    5 ++---
 pixman/pixman-private.h   |   12 ++++++------
 pixman/pixman-sse2.c      |    7 +------
 pixman/pixman-vmx.c       |    5 ++---
 9 files changed, 58 insertions(+), 41 deletions(-)

New commits:
commit 2de397c272fd60d6ce4311b411ad37a8e39daff6
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Mon Jan 24 12:24:42 2011 -0500

    Move fallback decisions from implementations into pixman-cpu.c.
    
    Instead of having each individual implementation decide which fallback
    to use, move it into pixman-cpu.c, where a more global decision can be
    made.
    
    This is accomplished by adding a "fallback" argument to all the
    pixman_implementation_create_*() implementations, and then in
    _pixman_choose_implementation() pass in the desired fallback.

diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index c28c481..7d6c837 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -414,13 +414,8 @@ BIND_COMBINE_U (add)
 BIND_COMBINE_U (out_reverse)
 
 pixman_implementation_t *
-_pixman_implementation_create_arm_neon (void)
+_pixman_implementation_create_arm_neon (pixman_implementation_t *fallback)
 {
-#ifdef USE_ARM_SIMD
-    pixman_implementation_t *fallback = _pixman_implementation_create_arm_simd ();
-#else
-    pixman_implementation_t *fallback = _pixman_implementation_create_fast_path ();
-#endif
     pixman_implementation_t *imp =
 	_pixman_implementation_create (fallback, arm_neon_fast_paths);
 
diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c
index dc2f471..6bbc109 100644
--- a/pixman/pixman-arm-simd.c
+++ b/pixman/pixman-arm-simd.c
@@ -415,10 +415,9 @@ static const pixman_fast_path_t arm_simd_fast_paths[] =
 };
 
 pixman_implementation_t *
-_pixman_implementation_create_arm_simd (void)
+_pixman_implementation_create_arm_simd (pixman_implementation_t *fallback)
 {
-    pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
-    pixman_implementation_t *imp = _pixman_implementation_create (general, arm_simd_fast_paths);
+    pixman_implementation_t *imp = _pixman_implementation_create (fallback, arm_simd_fast_paths);
 
     return imp;
 }
diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c
index 70253d1..0e14ecb 100644
--- a/pixman/pixman-cpu.c
+++ b/pixman/pixman-cpu.c
@@ -576,28 +576,36 @@ pixman_have_sse2 (void)
 pixman_implementation_t *
 _pixman_choose_implementation (void)
 {
-#ifdef USE_SSE2
-    if (pixman_have_sse2 ())
-	return _pixman_implementation_create_sse2 ();
-#endif
+    pixman_implementation_t *imp;
+
+    imp = _pixman_implementation_create_general();
+    imp = _pixman_implementation_create_fast_path (imp);
+    
 #ifdef USE_MMX
     if (pixman_have_mmx ())
-	return _pixman_implementation_create_mmx ();
+	imp = _pixman_implementation_create_mmx (imp);
 #endif
 
-#ifdef USE_ARM_NEON
-    if (pixman_have_arm_neon ())
-	return _pixman_implementation_create_arm_neon ();
+#ifdef USE_SSE2
+    if (pixman_have_sse2 ())
+	imp = _pixman_implementation_create_sse2 (imp);
 #endif
+
 #ifdef USE_ARM_SIMD
     if (pixman_have_arm_simd ())
-	return _pixman_implementation_create_arm_simd ();
+	imp = _pixman_implementation_create_arm_simd (imp);
+#endif
+
+#ifdef USE_ARM_NEON
+    if (pixman_have_arm_neon ())
+	imp = _pixman_implementation_create_arm_neon (imp);
 #endif
+    
 #ifdef USE_VMX
     if (pixman_have_vmx ())
-	return _pixman_implementation_create_vmx ();
+	imp = _pixman_implementation_create_vmx (imp);
 #endif
 
-    return _pixman_implementation_create_fast_path ();
+    return imp;
 }
 
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 2f9f176..eb09715 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -1925,10 +1925,9 @@ fast_path_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_fast_path (void)
+_pixman_implementation_create_fast_path (pixman_implementation_t *fallback)
 {
-    pixman_implementation_t *general = _pixman_implementation_create_general ();
-    pixman_implementation_t *imp = _pixman_implementation_create (general, c_fast_paths);
+    pixman_implementation_t *imp = _pixman_implementation_create (fallback, c_fast_paths);
 
     imp->fill = fast_path_fill;
 
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 6daa364..0272347 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -3340,10 +3340,9 @@ mmx_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_mmx (void)
+_pixman_implementation_create_mmx (pixman_implementation_t *fallback)
 {
-    pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
-    pixman_implementation_t *imp = _pixman_implementation_create (general, mmx_fast_paths);
+    pixman_implementation_t *imp = _pixman_implementation_create (fallback, mmx_fast_paths);
 
     imp->combine_32[PIXMAN_OP_OVER] = mmx_combine_over_u;
     imp->combine_32[PIXMAN_OP_OVER_REVERSE] = mmx_combine_over_reverse_u;
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 1662d2c..664260b 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -534,31 +534,31 @@ pixman_implementation_t *
 _pixman_implementation_create_general (void);
 
 pixman_implementation_t *
-_pixman_implementation_create_fast_path (void);
+_pixman_implementation_create_fast_path (pixman_implementation_t *fallback);
 
 #ifdef USE_MMX
 pixman_implementation_t *
-_pixman_implementation_create_mmx (void);
+_pixman_implementation_create_mmx (pixman_implementation_t *fallback);
 #endif
 
 #ifdef USE_SSE2
 pixman_implementation_t *
-_pixman_implementation_create_sse2 (void);
+_pixman_implementation_create_sse2 (pixman_implementation_t *fallback);
 #endif
 
 #ifdef USE_ARM_SIMD
 pixman_implementation_t *
-_pixman_implementation_create_arm_simd (void);
+_pixman_implementation_create_arm_simd (pixman_implementation_t *fallback);
 #endif
 
 #ifdef USE_ARM_NEON
 pixman_implementation_t *
-_pixman_implementation_create_arm_neon (void);
+_pixman_implementation_create_arm_neon (pixman_implementation_t *fallback);
 #endif
 
 #ifdef USE_VMX
 pixman_implementation_t *
-_pixman_implementation_create_vmx (void);
+_pixman_implementation_create_vmx (pixman_implementation_t *fallback);
 #endif
 
 pixman_implementation_t *
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 3c0a42f..ae55456 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -5957,13 +5957,8 @@ sse2_fill (pixman_implementation_t *imp,
 __attribute__((__force_align_arg_pointer__))
 #endif
 pixman_implementation_t *
-_pixman_implementation_create_sse2 (void)
+_pixman_implementation_create_sse2 (pixman_implementation_t *fallback)
 {
-#ifdef USE_MMX
-    pixman_implementation_t *fallback = _pixman_implementation_create_mmx ();
-#else
-    pixman_implementation_t *fallback = _pixman_implementation_create_fast_path ();
-#endif
     pixman_implementation_t *imp = _pixman_implementation_create (fallback, sse2_fast_paths);
 
     /* SSE2 constants */
diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c
index e811cf7..6868704 100644
--- a/pixman/pixman-vmx.c
+++ b/pixman/pixman-vmx.c
@@ -1613,10 +1613,9 @@ static const pixman_fast_path_t vmx_fast_paths[] =
 };
 
 pixman_implementation_t *
-_pixman_implementation_create_vmx (void)
+_pixman_implementation_create_vmx (pixman_implementation_t *fallback)
 {
-    pixman_implementation_t *fast = _pixman_implementation_create_fast_path ();
-    pixman_implementation_t *imp = _pixman_implementation_create (fast, vmx_fast_paths);
+    pixman_implementation_t *imp = _pixman_implementation_create (fallback, vmx_fast_paths);
 
     /* Set up function pointers */
 
commit ed781df1cc30748c8193be9b9a497def0b768b6b
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Fri Jan 21 14:47:33 2011 -0500

    Print a warning when a development snapshot is being configured.
    
    It seems to be relatively common for people to use development
    snapshots of pixman thinking they are ordinary releases. This patch
    makes it such that if the current minor version is odd, configure will
    print a banner explaining the version number scheme plus information
    about where to report bugs.

diff --git a/configure.ac b/configure.ac
index e2f73dc..ab2ecde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -795,3 +795,26 @@ AC_OUTPUT([pixman-1.pc
 	   pixman/Makefile
 	   pixman/pixman-version.h
 	   test/Makefile])
+
+m4_if(m4_eval(pixman_minor % 2), [1], [
+   echo
+   echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
+   echo
+   echo "      Thanks for testing this development snapshot of pixman. Please"
+   echo "      report any problems you find, either by sending email to "
+   echo
+   echo "          pixman at lists.freedesktop.org"
+   echo
+   echo "      or by filing a bug at "
+   echo
+   echo "          https://bugs.freedesktop.org/enter_bug.cgi?product=pixman "
+   echo
+   echo "      If you are looking for a stable release of pixman, please note "
+   echo "      that stable releases have _even_ minor version numbers. Ie., "
+   echo "      pixman-0.]m4_eval(pixman_minor & ~1)[.x are stable releases, whereas pixman-$PIXMAN_VERSION_MAJOR.$PIXMAN_VERSION_MINOR.$PIXMAN_VERSION_MICRO is a "
+   echo "      development snapshot that may contain bugs and experimental "
+   echo "      features. "
+   echo 
+   echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
+   echo
+])


More information about the xorg-commit mailing list