GNOME Bugzilla – Bug 772421
Use eglGetPlatformDisplayEXT
Last modified: 2021-06-14 18:21:59 UTC
Created attachment 336914 [details] [review] 0001-check-accelerated-gles-Use-eglGetPlatformDisplayEXT.patch Don't force libEGL to guess what kind of display we're handing it.
Created attachment 336915 [details] [review] 0001-check-accelerated-gles-Use-eglGetPlatformDisplayEXT.patch Whoops, missed a #include.
Review of attachment 336915 [details] [review]: Looks good to me.
Created attachment 337457 [details] [review] Use eglGetPlatformDisplay{,EXT} if available A bit more paranoid about checking for extensions, and willing to use the EXT version if the KHR version is not available. Note that I don't have a gnome account, I can't commit this myself.
Review of attachment 337457 [details] [review]: Hey thanks. This looks mostly fine, and i'm okay with this going in as is, but if you want to do extra credit, here's some suggestions… If you don't like my suggestions, or aren't feeling motivated enough to do them, let me know and I'll just push what you did. ::: tools/gnome-session-check-accelerated-gles-helper.c @@ +42,3 @@ #ifdef GDK_WINDOWING_X11 +static EGLDisplay +get_display (void *native) function name should be somethink like get_egl_display_for_x_display, and the argument should be Display *x_display, not void *native. @@ +47,3 @@ + const char *client_exts = eglQueryString (NULL, EGL_EXTENSIONS); + + if (g_strstr_len (client_exts, -1, "EGL_KHR_platform_base")) { I don't think using g_strstr_len with a -1 literal ever really makes sense. Just use strstr instead. @@ +49,3 @@ + if (g_strstr_len (client_exts, -1, "EGL_KHR_platform_base")) { + PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = + (void *) eglGetProcAddress ("eglGetPlatformDisplay"); it's a little yucky to cast function pointers to (void*), but hey, dlsym does it so whatever. I do think (PFNEGLGETPLATFORMDISPLAYEXTPROC) instead of (void*) would be cleaner (but more wordy) @@ +68,3 @@ + return dpy; + } + So there's two chunks of duplicated code, you could condense it into a loop.
Hi I see this has been shipped as a downstream patch in Fedora for ~2 years Is this patch something that should go in as is since it's been stalled here for so long?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of gnome-session, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-session/-/issues/ Thank you for your understanding and your help.