Commits on Source (3)
-
Simon Ser authored
This flag should only be used when the caller intends to display the buffer on a hardware plane. Xwayland isn't a DRM client, so it doesn't make sense to use this flag. This change will allow the driver to potentially use buffer parameters that are more optimized. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-
Previously, linux-dmabuf was used unconditionally if the buffer had a modifier. However creating a linux-dmabuf buffer with a format/modifier which hasn't been advertised will fail. Change xwl_glamor_gbm_get_wl_buffer_for_pixmap to use linux-dmabuf when the format/modifier has been advertised only. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: xorg/xserver#1035 Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
c0e13cbf -
When the linux-dmabuf protocol is available, prefer it over the old wl_drm protocol. Previously wl_drm was used when modifiers aren't supported, however linux-dmabuf supports formats without modifiers too. In this case, linux-dmabuf will send a DRM_FORMAT_MOD_INVALID modifier for each supported format [1]. This allows compositors to better handle these buffers, getting a DMA-BUF and implementing features like direct scan-out. A similar logic has been implemented for EGL [2]. DRM_FORMAT_MOD_INVALID is now stored in the xwl_screen->formats list. glamor_get_modifiers still returns FALSE with zero modifiers if the only advertised modifier is DRM_FORMAT_MOD_INVALID. [1]: wayland/wayland-protocols@fb9b2a87 [2]: mesa/mesa@c376865f Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
d6558477