Skip to content

gl-renderer: use correct read-back format and support WL_SHM_FORMAT_ABGR8888

Loïc Yhuel requested to merge hwti/weston:gl-renderer-abgr into main

PIXMAN_a8r8g8b8 / PIXMAN_a8b8g8r8 only matches GL_BGRA_EXT / GL_BGRA on little-endian.
So to have a GL format, we should use DRM_FORMAT_ARGB8888 / DRM_FORMAT_ABGR8888.

Without GL_EXT_read_format_bgra, the read-back format is DRM_FORMAT_ABGR8888.
Then weston-screenshooter fails to create a wl_shm buffer with WL_SHM_FORMAT_ABGR8888, unless it has been added with wl_display_add_shm_format.

Signed-off-by: Loïc Yhuel loic.yhuel@softathome.com

Merge request reports

Loading