[PATCH xserver 1/2] fb: Handle ZPixmap planemask in GetImage the other way around

Eric Anholt eric at anholt.net
Mon Mar 20 17:41:07 UTC 2017


Adam Jackson <ajax at redhat.com> writes:

> Formerly we'd zero the image data and then pull out a plane at a time.
> It's faster to apply the planemask after the fact, since that turns the
> GetImage into a memcpy:
>
>   100000.0  101000.0 (1.010) (copy 0xaaaaaaaa) ShmGetImage 10x10 square
>    42400.0   59400.0 (1.401) (copy 0xaaaaaaaa) ShmGetImage 100x100 square
>     3040.0    5280.0 (1.737) (copy 0xaaaaaaaa) ShmGetImage 500x500 square
>    96100.0   95200.0 (0.991) (0xaaaaaaaa) GetImage 10x10 square
>    29600.0   36800.0 (1.243) (0xaaaaaaaa) GetImage 100x100 square
>     1850.0    2620.0 (1.416) (0xaaaaaaaa) GetImage 500x500 square
>
> Measured with Xvfb at depth 24 on Skylake i7-6560U.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>

It's a bit surprising that trading a memset and a pass of dword access
for a memcpy and a pass of dword access is a win, but then the MergeRop
isn't just a single & operation.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170320/f0aad6f8/attachment.sig>


More information about the xorg-devel mailing list