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

2015-06-08 Thread Adam Jackson
On Mon, 2015-06-08 at 20:19 +0200, Marc-André Lureau wrote: > This was based off similar code in xlib_sw_winsys.c You're right, that code's all wrong too. I'll send some patches to fix that up. - aja ___ mesa-dev mailing list mesa-dev@lists.freedeskto

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

2015-06-08 Thread Marc-André Lureau
Hi Adam, Thanks for the feedback On Mon, Jun 8, 2015 at 5:12 PM, Adam Jackson wrote: > On Fri, 2015-06-05 at 19:14 +0200, Marc-André Lureau wrote: > > XPutImage requires to copy the images around, and the request may be > > split over several chunks. Using XShm may improve performance. > > Almo

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

2015-06-08 Thread Marc-André Lureau
Hi Jose Thanks a lot for the quick feedback! On Fri, Jun 5, 2015 at 9:13 PM, Jose Fonseca wrote: > Sounds good in principle. I'm actually surprised this was happening > already. I always use llvmpipe the the non-DRI pure XLIB state tracker > which already does this. > > I saw that code, but I

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

2015-06-08 Thread Adam Jackson
On Fri, 2015-06-05 at 19:14 +0200, Marc-André Lureau wrote: > XPutImage requires to copy the images around, and the request may be > split over several chunks. Using XShm may improve performance. Almost certainly will, the XPutImage implementation is fairly comic. > +static volatile int XErrorFla

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

2015-06-05 Thread Jose Fonseca
Sounds good in principle. I'm actually surprised this was happening already. I always use llvmpipe the the non-DRI pure XLIB state tracker which already does this. Two comments: - There's src/gallium/winsys/sw/xlib/xlib_sw_winsys.c which implements this. I wonder if it would be simpler/clean

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

2015-06-05 Thread Marc-André Lureau
XPutImage requires to copy the images around, and the request may be split over several chunks. Using XShm may improve performance. In particular, the performances are bad when using gnome-shell with Spice and playing video. Chunking the update confuses the video detection heuristic: unfortunately