[Mesa-dev] [PATCH 4/4] drisw/glx: use XShm if possible

Marc-André Lureau marcandre.lureau at gmail.com
Wed Jun 10 10:04:08 PDT 2015


On Wed, Jun 10, 2015 at 6:17 PM, Chris Wilson <chris at chris-wilson.co.uk>

> I did not find how you serialised the XServer reading from the SHM
> following the call to XShmPutImage (which you may want to flush?) with
> subsequent rendering into the image.
Correct, there is no sync. And I think that explains the temporary glitches
I observe with gnome-shell when moving windows around for ex (they are
always temporary, there is fortunately always a pending update to fix it).
I am afraid it would have to wait for ShmCompletionEvent, unfortunately in
sync, since there is a single buffer, and mesa doesn't own the event
queue&loop (I think). Note that the sw x11 backend also seems to suffer
from this.

Another trick you may like to investigate is using the X server to do
> format conversions and tune the swrast for a small number of local
> formats (i.e. rgb16, argb32). This of course requires using XRender
> after the PutImage - and at that point keeping it as a ShmPixmap is
> hugely beneficial to UMA drivers.

That's an interesting optimization. However, my use case is mostly with
spice/vnc, so I don't think that would improve performance here since it's
all software-based.


Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150610/785b3eba/attachment.html>

More information about the mesa-dev mailing list