D10750: wayland: Add support for zwp_linux_dmabuf

Roman Gilg <[email protected]>
Newsgroups gmane.comp.kde.devel.plasma,gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
romangg added a comment.


  In D10750#486570 <https://phabricator.kde.org/D10750#486570>, @romangg wrote:
  
  > Multi-plane support is needed. See @fredrik's inline comment on how to do that:
  >
  > > We would need to create a separate EGL image and a separate texture for each plane.
  > >  The scene would need to bind each of those textures to separate texture binding points, and we would need to generate and use a shader that samples texels from each plane and performs YUV to RGB conversion.
  
  
  Going through Weston's code this seems only true for original multi-plane formats, but not for dma-bufs with multiple planes via modifier.
  See: https://gitlab.freedesktop.org/wayland/weston/blob/5d7877adfd31956bdad98da4a937059260da1f69/libweston/renderer-gl/gl-renderer.c#L2291
  
  While allowing multi-plane for the former would involve some more fundamental changes to KWin since we when need to save multiple textures per WindowPixmap, doing the modifier multi-plane it seems we just receive a single EGLImage which we can then texture from. At least the following revision works with both `weston-simple-dmabuf-egl` and `weston-simple-dmabuf-drm`. And session starts including XWayland (didn't work before).

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D10750

To: romangg, #kwin, #plasma, davidedmundson, mart, graesslin, fredrik
Cc: meven, zzag, romangg, anthonyfieroni, plasma-devel, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.