1 From 6e0df74dbfca26f92a18d968e1bf410bae134c8a Mon Sep 17 00:00:00 2001
2 From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
3 Date: Wed, 24 Feb 2010 00:26:57 +0000
4 Subject: ARM: added 'neon_composite_src_x888_8888' fast path
6 This fast path function improves performance of 'gnome-system-monitor'
9 Benchmark from ARM Cortex-A8 @720MHz
13 [ # ] backend test min(s) median(s) stddev. count
14 [ 0] image gnome-system-monitor 68.838 68.899 0.05% 5/6
18 [ # ] backend test min(s) median(s) stddev. count
19 [ 0] image gnome-system-monitor 53.336 53.384 0.09% 6/6
21 diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
22 index e90d662..f2643de 100644
23 --- a/pixman/pixman-arm-neon-asm.S
24 +++ b/pixman/pixman-arm-neon-asm.S
25 @@ -947,6 +947,44 @@ generate_composite_function \
27 /******************************************************************************/
29 +.macro pixman_composite_src_x888_8888_process_pixblock_head
34 +.macro pixman_composite_src_x888_8888_process_pixblock_tail
37 +.macro pixman_composite_src_x888_8888_process_pixblock_tail_head
38 + vst1.32 {d0, d1, d2, d3}, [DST_W, :128]!
39 + vld1.32 {d0, d1, d2, d3}, [SRC]!
45 +.macro pixman_composite_src_x888_8888_init
47 + vshl.u32 q2, q2, #24
50 +generate_composite_function \
51 + pixman_composite_src_x888_8888_asm_neon, 32, 0, 32, \
52 + FLAG_DST_WRITEONLY, \
53 + 8, /* number of pixels, processed in a single block */ \
54 + 10, /* prefetch distance */ \
55 + pixman_composite_src_x888_8888_init, \
57 + pixman_composite_src_x888_8888_process_pixblock_head, \
58 + pixman_composite_src_x888_8888_process_pixblock_tail, \
59 + pixman_composite_src_x888_8888_process_pixblock_tail_head, \
60 + 0, /* dst_w_basereg */ \
61 + 0, /* dst_r_basereg */ \
62 + 0, /* src_basereg */ \
63 + 0 /* mask_basereg */
65 +/******************************************************************************/
67 .macro pixman_composite_over_n_8_8888_process_pixblock_head
68 /* expecting deinterleaved source data in {d8, d9, d10, d11} */
69 /* d8 - blue, d9 - green, d10 - red, d11 - alpha */
70 diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
71 index 3f0e18e..0a7ac31 100644
72 --- a/pixman/pixman-arm-neon.c
73 +++ b/pixman/pixman-arm-neon.c
74 @@ -251,6 +251,7 @@ neon_composite_##name (pixman_implementation_t *imp, \
77 BIND_SRC_NULL_DST(src_8888_8888, uint32_t, 1, uint32_t, 1)
78 +BIND_SRC_NULL_DST(src_x888_8888, uint32_t, 1, uint32_t, 1)
79 BIND_SRC_NULL_DST(src_0565_0565, uint16_t, 1, uint16_t, 1)
80 BIND_SRC_NULL_DST(src_0888_0888, uint8_t, 3, uint8_t, 3)
81 BIND_SRC_NULL_DST(src_8888_0565, uint32_t, 1, uint16_t, 1)
82 @@ -400,6 +401,10 @@ static const pixman_fast_path_t arm_neon_fast_paths[] =
83 PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, neon_composite_src_8888_8888),
84 PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, neon_composite_src_8888_8888),
85 PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, neon_composite_src_8888_8888),
86 + PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, a8r8g8b8, neon_composite_src_8888_8888),
87 + PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, a8b8g8r8, neon_composite_src_8888_8888),
88 + PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, a8r8g8b8, neon_composite_src_x888_8888),
89 + PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, a8b8g8r8, neon_composite_src_x888_8888),
90 PIXMAN_STD_FAST_PATH (SRC, r8g8b8, null, r8g8b8, neon_composite_src_0888_0888),
91 PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, x8r8g8b8, neon_composite_src_0888_8888_rev),
92 PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, r5g6b5, neon_composite_src_0888_0565_rev),
93 @@ -430,6 +435,7 @@ static const pixman_fast_path_t arm_neon_fast_paths[] =
94 PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, neon_composite_over_8888_8888),
95 PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, neon_composite_over_8888_8888),
96 PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, neon_composite_over_8888_8888),
97 + PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, null, a8r8g8b8, neon_composite_src_x888_8888),
98 PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8, neon_composite_add_n_8_8),
99 PIXMAN_STD_FAST_PATH (ADD, a8, a8, a8, neon_composite_add_8_8_8),
100 PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, a8r8g8b8, neon_composite_add_8888_8888_8888),