diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2010-02-24 02:26:57 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2010-03-03 19:42:34 +0200 |
commit | 072a7d31a8c872666787b69a6bd1b537565c5b96 (patch) | |
tree | 84475b2f8799a1090407c285ee34063683850192 | |
parent | 2ed7c13922f83404bd9976c00d00738d0314693f (diff) |
ARM: added 'neon_composite_src_x888_8888' fast path
This fast path function improves performance of 'gnome-system-monitor'
cairo-perf trace.
Benchmark from ARM Cortex-A8 @720MHz
before:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image gnome-system-monitor 68.838 68.899 0.05% 5/6
after:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image gnome-system-monitor 53.336 53.384 0.09% 6/6
-rw-r--r-- | pixman/pixman-arm-neon-asm.S | 38 | ||||
-rw-r--r-- | pixman/pixman-arm-neon.c | 7 |
2 files changed, 45 insertions, 0 deletions
diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S index e90d662..f2643de 100644 --- a/pixman/pixman-arm-neon-asm.S +++ b/pixman/pixman-arm-neon-asm.S | |||
@@ -947,6 +947,44 @@ generate_composite_function \ | |||
947 | 947 | ||
948 | /******************************************************************************/ | 948 | /******************************************************************************/ |
949 | 949 | ||
950 | .macro pixman_composite_src_x888_8888_process_pixblock_head | ||
951 | vorr q0, q0, q2 | ||
952 | vorr q1, q1, q2 | ||
953 | .endm | ||
954 | |||
955 | .macro pixman_composite_src_x888_8888_process_pixblock_tail | ||
956 | .endm | ||
957 | |||
958 | .macro pixman_composite_src_x888_8888_process_pixblock_tail_head | ||
959 | vst1.32 {d0, d1, d2, d3}, [DST_W, :128]! | ||
960 | vld1.32 {d0, d1, d2, d3}, [SRC]! | ||
961 | vorr q0, q0, q2 | ||
962 | vorr q1, q1, q2 | ||
963 | cache_preload 8, 8 | ||
964 | .endm | ||
965 | |||
966 | .macro pixman_composite_src_x888_8888_init | ||
967 | vmov.u8 q2, #0xFF | ||
968 | vshl.u32 q2, q2, #24 | ||
969 | .endm | ||
970 | |||
971 | generate_composite_function \ | ||
972 | pixman_composite_src_x888_8888_asm_neon, 32, 0, 32, \ | ||
973 | FLAG_DST_WRITEONLY, \ | ||
974 | 8, /* number of pixels, processed in a single block */ \ | ||
975 | 10, /* prefetch distance */ \ | ||
976 | pixman_composite_src_x888_8888_init, \ | ||
977 | default_cleanup, \ | ||
978 | pixman_composite_src_x888_8888_process_pixblock_head, \ | ||
979 | pixman_composite_src_x888_8888_process_pixblock_tail, \ | ||
980 | pixman_composite_src_x888_8888_process_pixblock_tail_head, \ | ||
981 | 0, /* dst_w_basereg */ \ | ||
982 | 0, /* dst_r_basereg */ \ | ||
983 | 0, /* src_basereg */ \ | ||
984 | 0 /* mask_basereg */ | ||
985 | |||
986 | /******************************************************************************/ | ||
987 | |||
950 | .macro pixman_composite_over_n_8_8888_process_pixblock_head | 988 | .macro pixman_composite_over_n_8_8888_process_pixblock_head |
951 | /* expecting deinterleaved source data in {d8, d9, d10, d11} */ | 989 | /* expecting deinterleaved source data in {d8, d9, d10, d11} */ |
952 | /* d8 - blue, d9 - green, d10 - red, d11 - alpha */ | 990 | /* d8 - blue, d9 - green, d10 - red, d11 - alpha */ |
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index 3f0e18e..44322e7 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c | |||
@@ -251,6 +251,7 @@ neon_composite_##name (pixman_implementation_t *imp, \ | |||
251 | 251 | ||
252 | 252 | ||
253 | BIND_SRC_NULL_DST(src_8888_8888, uint32_t, 1, uint32_t, 1) | 253 | BIND_SRC_NULL_DST(src_8888_8888, uint32_t, 1, uint32_t, 1) |
254 | BIND_SRC_NULL_DST(src_x888_8888, uint32_t, 1, uint32_t, 1) | ||
254 | BIND_SRC_NULL_DST(src_0565_0565, uint16_t, 1, uint16_t, 1) | 255 | BIND_SRC_NULL_DST(src_0565_0565, uint16_t, 1, uint16_t, 1) |
255 | BIND_SRC_NULL_DST(src_0888_0888, uint8_t, 3, uint8_t, 3) | 256 | BIND_SRC_NULL_DST(src_0888_0888, uint8_t, 3, uint8_t, 3) |
256 | BIND_SRC_NULL_DST(src_8888_0565, uint32_t, 1, uint16_t, 1) | 257 | BIND_SRC_NULL_DST(src_8888_0565, uint32_t, 1, uint16_t, 1) |
@@ -400,6 +401,10 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = | |||
400 | PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, neon_composite_src_8888_8888), | 401 | PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, neon_composite_src_8888_8888), |
401 | PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, neon_composite_src_8888_8888), | 402 | PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, neon_composite_src_8888_8888), |
402 | PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, neon_composite_src_8888_8888), | 403 | PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, neon_composite_src_8888_8888), |
404 | PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, a8r8g8b8, neon_composite_src_8888_8888), | ||
405 | PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, a8b8g8r8, neon_composite_src_8888_8888), | ||
406 | PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, a8r8g8b8, neon_composite_src_x888_8888), | ||
407 | PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, a8b8g8r8, neon_composite_src_x888_8888), | ||
403 | PIXMAN_STD_FAST_PATH (SRC, r8g8b8, null, r8g8b8, neon_composite_src_0888_0888), | 408 | PIXMAN_STD_FAST_PATH (SRC, r8g8b8, null, r8g8b8, neon_composite_src_0888_0888), |
404 | PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, x8r8g8b8, neon_composite_src_0888_8888_rev), | 409 | PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, x8r8g8b8, neon_composite_src_0888_8888_rev), |
405 | PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, r5g6b5, neon_composite_src_0888_0565_rev), | 410 | PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, r5g6b5, neon_composite_src_0888_0565_rev), |
@@ -430,6 +435,8 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = | |||
430 | PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, neon_composite_over_8888_8888), | 435 | PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, neon_composite_over_8888_8888), |
431 | PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, neon_composite_over_8888_8888), | 436 | PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, neon_composite_over_8888_8888), |
432 | PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, neon_composite_over_8888_8888), | 437 | PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, neon_composite_over_8888_8888), |
438 | PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, null, a8r8g8b8, neon_composite_src_x888_8888), | ||
439 | PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, null, a8b8g8r8, neon_composite_src_x888_8888), | ||
433 | PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8, neon_composite_add_n_8_8), | 440 | PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8, neon_composite_add_n_8_8), |
434 | PIXMAN_STD_FAST_PATH (ADD, a8, a8, a8, neon_composite_add_8_8_8), | 441 | PIXMAN_STD_FAST_PATH (ADD, a8, a8, a8, neon_composite_add_8_8_8), |
435 | PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, a8r8g8b8, neon_composite_add_8888_8888_8888), | 442 | PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, a8r8g8b8, neon_composite_add_8888_8888_8888), |