diff options
author | Thomas Hebb <tommyhebb@gmail.com> | 2022-01-05 00:16:59 -0800 |
---|---|---|
committer | Thomas Hebb <tommyhebb@gmail.com> | 2022-01-05 15:48:29 -0800 |
commit | 59b9518f072527ac59593e51df7f5d5331a34f0e (patch) | |
tree | 21e27b17ca94a1527e6f80cb14bc4294329a19a5 /util/meson.build | |
parent | 9988eb3378dbc3301059aa9b5e1ff476354cb92b (diff) |
render/gles2: don't constrain shm formats to ones that support reading
commit 44e8451cd93e ("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: 44e8451cd93e ("render/gles2: hide shm formats without GL support")
Diffstat (limited to 'util/meson.build')
0 files changed, 0 insertions, 0 deletions