egl/android: Fix sRGB visuals

The switch to filtering visuals by pipe_format overlooked the
corresponding _SRGB formats.

Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11182
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29292>
(cherry picked from commit 924c5ad2ac)
This commit is contained in:
Rob Clark 2024-05-20 09:29:08 -07:00 committed by Eric Engestrom
parent d7c6acac89
commit 8efa17cf76
2 changed files with 7 additions and 2 deletions

View file

@ -74,7 +74,7 @@
"description": "egl/android: Fix sRGB visuals",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "273e54391af7e0a89daec778980c3f8a800bcd7b",
"notes": null

View file

@ -838,7 +838,12 @@ droid_add_configs_for_visuals(_EGLDisplay *disp)
const struct gl_config *gl_config =
(struct gl_config *) dri2_dpy->driver_configs[j];
if (gl_config->color_format != visuals[i].pipe_format)
/* Rather than have duplicate table entries for _SRGB formats, just
* use the linear version of the format for the comparision:
*/
enum pipe_format linear_format =
util_format_linear(gl_config->color_format);
if (linear_format != visuals[i].pipe_format)
continue;
const EGLint surface_type = EGL_WINDOW_BIT | EGL_PBUFFER_BIT;