[Pixman] [PATCH 05/12] vmx: implement fast path vmx_composite_copy_area

Siarhei Siamashka siarhei.siamashka at gmail.com
Tue Jul 14 01:41:13 PDT 2015


On Thu,  2 Jul 2015 13:04:10 +0300
Oded Gabbay <oded.gabbay at gmail.com> wrote:

> No changes were observed when running cairo trimmed benchmarks.
> 
> Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
> ---
>  pixman/pixman-vmx.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c
> index b42288b..e69d530 100644
> --- a/pixman/pixman-vmx.c
> +++ b/pixman/pixman-vmx.c
> @@ -2831,6 +2831,20 @@ vmx_blt (pixman_implementation_t *imp,
>  }
>  
>  static void
> +vmx_composite_copy_area (pixman_implementation_t *imp,
> +                          pixman_composite_info_t *info)
> +{
> +    PIXMAN_COMPOSITE_ARGS (info);
> +    vmx_blt (imp, src_image->bits.bits,
> +	      dest_image->bits.bits,
> +	      src_image->bits.rowstride,
> +	      dest_image->bits.rowstride,
> +	      PIXMAN_FORMAT_BPP (src_image->bits.format),
> +	      PIXMAN_FORMAT_BPP (dest_image->bits.format),
> +	      src_x, src_y, dest_x, dest_y, width, height);
> +}
> +
> +static void
>  vmx_composite_over_8888_8888 (pixman_implementation_t *imp,
>                                 pixman_composite_info_t *info)
>  {
> @@ -2939,12 +2953,24 @@ static const pixman_fast_path_t vmx_fast_paths[] =
>      PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, vmx_composite_over_8888_8888),
>      PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, vmx_composite_over_8888_8888),
>      PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, vmx_composite_over_8888_8888),
> +    PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, null, x8r8g8b8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, null, x8b8g8r8, vmx_composite_copy_area),
>  
>      /* PIXMAN_OP_ADD */
>      PIXMAN_STD_FAST_PATH (ADD, a8, null, a8, vmx_composite_add_8_8),
>      PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, null, a8r8g8b8, vmx_composite_add_8888_8888),
>      PIXMAN_STD_FAST_PATH (ADD, a8b8g8r8, null, a8b8g8r8, vmx_composite_add_8888_8888),
>  
> +    /* PIXMAN_OP_SRC */
> +    PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, a8r8g8b8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, a8b8g8r8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, x8r8g8b8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, vmx_composite_copy_area),
> +    PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, b5g6r5, vmx_composite_copy_area),
> +
>      {   PIXMAN_OP_NONE	},
>  };

It is a good idea to have at least one benchmark result in the commit
message. Or provide a convincing explanation why this particular code
is beneficial. The "no changes were observed" commit message does not
do a good job justifying the need for this patch.

If none of the traces of cairo applications can show any improvements,
then we can at least use "lowlevel-blt-bench src_8888_8888". I get
the following results on my Playstation3:

== before ==

           src_8888_8888 =  L1: 437.68  L2: 277.55  M:159.34 (242.58%)
           HT: 90.31  VT: 50.77  R: 50.67  RT: 17.64 ( 148Kops/s)

== after ==

           src_8888_8888 =  L1: 850.60  L2: 453.91  M:174.26 (265.31%)
           HT:105.68  VT: 54.17  R: 54.88  RT: 18.72 ( 154Kops/s)


Assuming that the commit message gets updated,
Acked-by: Siarhei Siamashka <siarhei.siamashka at gmail.com>

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list