diff --git a/.pick_status.json b/.pick_status.json index bb4d849758f..a4d44a8e0e0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index e631418380c..87e647ae706 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -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;