pixman: Branch 'master' - 3 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Sat Jun 25 13:53:19 PDT 2011


 pixman/pixman-arm-neon-asm.S |    8 ++++----
 test/blitters-test.c         |   22 ++++++++++++++--------
 2 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 4d4d1760e8118aaea06783079a3b87f83deb4907
Author: Søren Sandmann <ssp at redhat.com>
Date:   Sat Jun 25 10:16:25 2011 -0400

    test: Make fuzzer-find-diff.pl executable

diff --git a/test/fuzzer-find-diff.pl b/test/fuzzer-find-diff.pl
old mode 100644
new mode 100755
commit ece8d13bf77d050662bb9db9716576dabff37554
Author: Søren Sandmann <sandmann at cs.au.dk>
Date:   Sun Jun 19 20:29:08 2011 -0400

    ARM: Fix two bugs in neon_composite_over_n_8888_0565_ca().
    
    The first bug is that a vmull.u8 instruction would store its result in
    the q1 register, clobbering the d2 register used later on. The second
    is that a vraddhn instruction would overwrite d25, corrupting the q12
    register used later.
    
    Fixing the second bug caused a pipeline bubble where the d18 register
    would be unavailable for a clock cycle. This is fixed by swapping the
    instruction with its successor.

diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
index 833f18c..7cddf7e 100644
--- a/pixman/pixman-arm-neon-asm.S
+++ b/pixman/pixman-arm-neon-asm.S
@@ -1514,11 +1514,11 @@ generate_composite_function \
              * output: updated src in   {d0,  d1,  d2 }       [B, G, R]
              *         updated mask in  {d24, d25, d26}       [B, G, R]
              */
-            vmull.u8    q1,  d25, d9
+            vmull.u8    q6,  d26, d10
         vqadd.u8    q8,  q0, q8
             vmull.u8    q0,  d24, d8
         vqadd.u8    d22, d2, d22
-            vmull.u8    q6,  d26, d10
+            vmull.u8    q1,  d25, d9
         /*
          * convert the result in d16, d17, d22 to r5g6b5 and store
          * it into {d28, d29}
@@ -1541,6 +1541,7 @@ generate_composite_function \
             vrshr.u16   q11, q12, #8
             vrshr.u16   q8,  q9,  #8
             vrshr.u16   q6,  q13, #8
+            vraddhn.u16 d24, q12, q11
             vraddhn.u16 d25, q9,  q8
                 /*
                  * convert 8 r5g6b5 pixel data from {d4, d5} to planar
@@ -1549,11 +1550,10 @@ generate_composite_function \
                  */
                 vshrn.u16   d17, q2,  #3
                 vshrn.u16   d18, q2,  #8
-            vraddhn.u16 d24, q12, q11
             vraddhn.u16 d26, q13, q6
                 vsli.u16    q2,  q2,  #5
-                vsri.u8     d18, d18, #5
                 vsri.u8     d17, d17, #6
+                vsri.u8     d18, d18, #5
             /*
              * 'combine_over_ca' replacement
              *
commit 5715a394c41b2fd259ce7bf07b859d2a4eb2ec09
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Sun Jun 19 19:10:45 2011 -0400

    blitters-test: Make common formats more likely to be tested.
    
    Move the eight most common formats to the top of the list of image
    formats and make create_random_image() much more likely to select one
    of those eight formats.
    
    This should help catch more bugs in SIMD optimized operations.

diff --git a/test/blitters-test.c b/test/blitters-test.c
index 3ecfb09..594ec54 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -14,6 +14,11 @@
 static pixman_indexed_t rgb_palette[9];
 static pixman_indexed_t y_palette[9];
 
+/* The first eight format in the list are by far the most widely
+ * used formats, so we test those more than the others
+ */
+#define N_MOST_LIKELY_FORMATS 8
+
 /* Create random image for testing purposes */
 static pixman_image_t *
 create_random_image (pixman_format_code_t *allowed_formats,
@@ -29,6 +34,9 @@ create_random_image (pixman_format_code_t *allowed_formats,
 
     while (allowed_formats[n] != PIXMAN_null)
 	n++;
+
+    if (n > N_MOST_LIKELY_FORMATS && lcg_rand_n (4) != 0)
+	n = N_MOST_LIKELY_FORMATS;
     fmt = allowed_formats[lcg_rand_n (n)];
 
     width = lcg_rand_n (max_width) + 1;
@@ -177,12 +185,14 @@ static pixman_op_t op_list[] = {
 
 static pixman_format_code_t img_fmt_list[] = {
     PIXMAN_a8r8g8b8,
+    PIXMAN_a8b8g8r8,
     PIXMAN_x8r8g8b8,
+    PIXMAN_x8b8g8r8,
     PIXMAN_r5g6b5,
-    PIXMAN_r3g3b2,
+    PIXMAN_b5g6r5,
     PIXMAN_a8,
-    PIXMAN_a8b8g8r8,
-    PIXMAN_x8b8g8r8,
+    PIXMAN_a1,
+    PIXMAN_r3g3b2,
     PIXMAN_b8g8r8a8,
     PIXMAN_b8g8r8x8,
     PIXMAN_r8g8b8a8,
@@ -190,8 +200,6 @@ static pixman_format_code_t img_fmt_list[] = {
     PIXMAN_x14r6g6b6,
     PIXMAN_r8g8b8,
     PIXMAN_b8g8r8,
-    PIXMAN_r5g6b5,
-    PIXMAN_b5g6r5,
     PIXMAN_x2r10g10b10,
     PIXMAN_a2r10g10b10,
     PIXMAN_x2b10g10r10,
@@ -204,7 +212,6 @@ static pixman_format_code_t img_fmt_list[] = {
     PIXMAN_x4r4g4b4,
     PIXMAN_a4b4g4r4,
     PIXMAN_x4b4g4r4,
-    PIXMAN_a8,
     PIXMAN_r3g3b2,
     PIXMAN_b2g3r3,
     PIXMAN_a2r2g2b2,
@@ -222,7 +229,6 @@ static pixman_format_code_t img_fmt_list[] = {
     PIXMAN_b1g2r1,
     PIXMAN_a1r1g1b1,
     PIXMAN_a1b1g1r1,
-    PIXMAN_a1,
     PIXMAN_null
 };
 
@@ -417,6 +423,6 @@ main (int argc, const char *argv[])
     }
 
     return fuzzer_test_main("blitters", 2000000,
-			    0x265CDFEB,
+			    0xB610300B,
 			    test_composite, argc, argv);
 }


More information about the xorg-commit mailing list