[PATCH xserver 2/3] glamor: Accelerate up XY pixmap putimage a little

Adam Jackson ajax at redhat.com
Tue Oct 4 16:14:08 UTC 2016


On Mon, 2016-10-03 at 15:34 -0700, Keith Packard wrote:

> That's true for GetImage, but the protocol doc is rather unclear about
> PutImage. The only mention of 'plane-mask' in the PutImage spec is as a
> relevant component in the GC. Xlib doesn't look at the plane mask; the
> request length is computed with:
> 
>     bytes_per_dest = (unsigned long)ROUNDUP((long)req->width + req->leftPad,
> 					    dpy->bitmap_pad) >> 3;
>     bytes_per_dest_plane = bytes_per_dest * req->height;
>     length = bytes_per_dest_plane * image->depth;
>     req->length += (length + 3) >> 2;
> 
> Looks like fb has a bug.

You appear to be correct, I was reading fb's XYPixmap path a bit too
closely. Neither xlib nor ProcPutImage make reference to the planemask
when computing the image length, so they must be right regardless of
the actual spec's silence.

- ajax


More information about the xorg-devel mailing list