Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:guana.histark:gnome-desktop-3.38.5-1-el8-x86_64
fc33-gnome-session-3.38.0
_service:download_src_package:0001-check-accele...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:0001-check-accelerated-gles-Use-eglGetPlatformDisplay-EXT.patch of Package fc33-gnome-session-3.38.0
From 687ec347d2fa0bca227e3a583a3a47f9bbc10bb0 Mon Sep 17 00:00:00 2001 From: Adam Jackson <ajax@redhat.com> Date: Tue, 4 Oct 2016 13:15:39 -0400 Subject: [PATCH] check-accelerated-gles: Use eglGetPlatformDisplay{,EXT} eglGetDisplay forces the implementation to guess, and in general it can't guess correctly. Be explicit. Signed-off-by: Adam Jackson <ajax@redhat.com> --- .../gnome-session-check-accelerated-gles-helper.c | 36 +++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tools/gnome-session-check-accelerated-gles-helper.c b/tools/gnome-session-check-accelerated-gles-helper.c index 2a38d9e..472d1ad 100644 --- a/tools/gnome-session-check-accelerated-gles-helper.c +++ b/tools/gnome-session-check-accelerated-gles-helper.c @@ -34,11 +34,43 @@ #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <EGL/egl.h> +#include <EGL/eglext.h> #endif #include "gnome-session-check-accelerated-common.h" #ifdef GDK_WINDOWING_X11 +static EGLDisplay +get_display (void *native) +{ + EGLDisplay dpy = NULL; + const char *client_exts = eglQueryString (NULL, EGL_EXTENSIONS); + + if (g_strstr_len (client_exts, -1, "EGL_KHR_platform_base")) { + PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = + (void *) eglGetProcAddress ("eglGetPlatformDisplay"); + + if (get_platform_display) + dpy = get_platform_display (EGL_PLATFORM_X11_KHR, native, NULL); + + if (dpy) + return dpy; + } + + if (g_strstr_len (client_exts, -1, "EGL_EXT_platform_base")) { + PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = + (void *) eglGetProcAddress ("eglGetPlatformDisplayEXT"); + + if (get_platform_display) + dpy = get_platform_display (EGL_PLATFORM_X11_KHR, native, NULL); + + if (dpy) + return dpy; + } + + return eglGetDisplay ((EGLNativeDisplayType) native); +} + static char * get_gles_renderer (void) { @@ -67,7 +99,9 @@ get_gles_renderer (void) gdk_error_trap_push (); display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); - egl_dpy = eglGetDisplay (display); + + egl_dpy = get_display (display); + if (!egl_dpy) { g_warning ("eglGetDisplay() failed"); goto out; -- 2.9.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor