wlroots/render
Thomas Hebb ea77cc5cb2 render/gles2: don't constrain shm formats to ones that support reading
commit 44e8451cd9 ("render/gles2: hide shm formats without GL
support") added the is_gles2_pixel_format_supported() function to
render/gles2/pixel_format.c, whose stated purpose is to "check whether
the renderer has the needed GL extensions to read a given pixel format."
It then used that function to filter the pixel formats returned by
get_gles2_shm_formats().

The result of this change is that RGB formats are no longer reported for
GL drivers that don't implement EXT_read_format_bgra, even when those
formats are supported for rendering (which they have to be for
wlr_gles2_renderer_create() to succeed). This is a pretty clear
regression, since wlr_renderer_init_wl_shm() fails when either of
WL_SHM_FORMAT_ARGB8888 or WL_SHM_FORMAT_XRGB8888 are missing.

To fix the regression, change is_gles2_pixel_format_supported() to
accept all pixel formats that support rendering, regardless of whether
we can read them or not, and move the check for EXT_read_format_bgra
back into gles2_read_pixels(). (There's already a check for this
extension in gles2_preferred_read_format(), so we're not breaking any
abstraction that wasn't already broken.)

Tested on the NVIDIA 495.46 proprietary driver, which doesn't support
EXT_read_format_bgra.

Fixes: 44e8451cd9 ("render/gles2: hide shm formats without GL support")
(cherry picked from commit 59b9518f072527ac59593e51df7f5d5331a34f0e)
2022-02-02 20:08:17 +01:00
..
allocator Require INVALID for implicit format modifiers 2021-11-26 16:40:53 +00:00
gles2 render/gles2: don't constrain shm formats to ones that support reading 2022-02-02 20:08:17 +01:00
pixman render/pixman: advertise MOD_INVALID instead of MOD_LINEAR 2021-12-02 14:12:14 +00:00
vulkan vulkan: Fix imported image layout 2022-02-02 20:08:01 +01:00
dmabuf.c render/dmabuf: make src arg const in wlr_dmabuf_attributes_copy 2021-02-02 19:53:16 +01:00
drm_format_set.c render/drm-format-set: add wlr_drm_format_set_intersect 2021-12-03 14:42:41 +00:00
egl.c render/egl: improve modifier support detection 2021-12-02 14:21:51 +00:00
meson.build render: completely disable gles2 if requested but libEGL is found 2021-11-02 09:36:38 +00:00
pixel_format.c render/pixel_format: add more formats for Pixman 2021-08-03 02:53:03 -04:00
swapchain.c Move allocator stuff into new directory 2021-08-25 09:57:20 -04:00
wlr_renderer.c render: add wlr_renderer_init_wl_shm 2021-12-07 15:15:28 +01:00
wlr_texture.c render/wlr_texture: put wlr_texture_from_buffer into the public API 2021-07-22 22:28:24 +02:00