[PATCH] Include ShmGetImage tests for x11perf

Adam Jackson ajax at nwnk.net
Thu Jan 6 08:18:15 PST 2011


On Thu, 2011-01-06 at 13:25 +0000, Chris Wilson wrote:
> I noticed that there were no corresponding tests for ShmGetImage to
> attempt to measure the performance of readback without the overhead of
> pushing those pixels over the wire.
> 
> This adds a test based on GetImage, but it has a bug where the Window is
> cleared after the first run - it doesn't seem to affect the results.
> I haven't been able to spot it, so I'm hoping a few more eyes might.
> -Chris

Well that's easy enough:

> +  {"-shmget10", "ShmGetImage 10x10 square", NULL,
> +		InitShmGetImage, DoShmGetImage, MidCopyPix, EndShmGetImage,
> +		V1_2FEATURE, ROP, 0,
> +		{4, 10}},

void
MidCopyPix(XParms xp, Parms p)
{
    XClearWindow(xp->d, xp->w);
}

The only issue I have with this test is that XShmGetImage blocks on the
reply from the server, so you're never going to go any faster than the
roundtrip ceiling of x11perf -prop; the numeric result from -shmget will
only be directly interesting if it's lower than the number from -prop.

But in that sense x11perf isn't set up to do this well at all, you
really want something xcb-ish to fire enough GetImages to be able to
measure the download speed and just collect and discard the replies.

Still, worth adding.  With the MidCopyPix thing fixed:

Reviewed-by: Adam Jackson <ajax at redhat.com>

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110106/5db935e9/attachment.pgp>


More information about the xorg-devel mailing list