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

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


XPutImage requires to copy the images around, and the request may be
split over several chunks. Using XShm should 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 it's not easy to change it without
breaking further other cases. Making one big request per video frames
solves most of the issues.

Changes since RFC:
 - fix shm leaks
 - check XShm error only
 - fallbacks on regular XPutImage after xshm failure
 - remove unnecessary XFlush call
 - tested and fixed with 16bpp visuals
 - split patch for easier review

Marc-André Lureau (4):
  dri: add putImageShm to swrastLoader
  drisw: use putImageShm if available
  drisw: use shared memory when possible
  drisw/glx: use XShm if possible

 include/GL/internal/dri_interface.h           |  12 +-
 src/gallium/include/state_tracker/drisw_api.h |   3 +
 src/gallium/state_trackers/dri/drisw.c        |  37 ++++--
 src/gallium/winsys/sw/dri/dri_sw_winsys.c     |  72 +++++++++--
 src/glx/drisw_glx.c                           | 164 ++++++++++++++++++++++----
 src/glx/drisw_priv.h                          |   3 +
 6 files changed, 246 insertions(+), 45 deletions(-)


More information about the mesa-dev mailing list