[GTK] Does not use GLES2 in Wayland when rendering with gdk_cairo_draw_from_gl
https://bugs.webkit.org/show_bug.cgi?id=163595
Summary [GTK] Does not use GLES2 in Wayland when rendering with gdk_cairo_draw_from_gl
ManDay
Reported 2016-10-18 05:52:14 PDT
Compiled with ENABLE_OPENGL=ON ENABLE_GLES2=ON, Webkit attempts to use GL and fails due to absesence of libGL.so. I broke on gdk_gl_context_set_use_es where a GdkGLContext is created with NO GLES2 and the backtrace reads as attached
Attachments
Backtrace (7.74 KB, text/plain)
2016-10-18 05:53 PDT, ManDay
no flags
ManDay
Comment 1 2016-10-18 05:53:45 PDT
Created attachment 291943 [details] Backtrace
ManDay
Comment 2 2016-10-18 07:46:58 PDT
According to a GTK+ dev, Webkit is supposed to request GLES - Gdk does not automatially detect the availability or preference.
Carlos Alberto Lopez Perez
Comment 3 2016-10-18 08:57:04 PDT
Can you check the output of: 1. ldd /path/to/libwebkit2gtk-4.0.so.37 2. ldd /path/to/WebKitWebProcess Does any of them link with libGL or give any error related to libraries not found?
Michael Catanzaro
Comment 4 2016-10-18 09:08:51 PDT
(In reply to comment #2) > According to a GTK+ dev, Webkit is supposed to request GLES - Gdk does not > automatially detect the availability or preference. If environment variables are the only way, you'll have to set them before starting WebKit. We're not going to mess with that.
Carlos Garcia Campos
Comment 5 2016-10-24 01:22:11 PDT
(In reply to comment #2) > According to a GTK+ dev, Webkit is supposed to request GLES - Gdk does not > automatially detect the availability or preference. That's not really possible I'm afraid. gdk_cairo_draw_from_gl() uses the paint gl context of the given window that is always created with a NULL sharing context and realized right after being created. On realize is when using ES is decided, and the only way to change that for the paint gl context is using the debug flags. I don't think using debug flags for this is the right way. I think there should be a way to tell GDK to use ES globally, maybe in GdkWindow to use that when creating the paint context. Or maybe there's actually a way that is not the debug flags, but I haven't found it reading the code.
Carlos Garcia Campos
Comment 6 2016-10-24 01:24:29 PDT
What I would do as a workaround for now is to fallback to glReadPixels when USE(OPENGL_ES_2) is enabled.
Note You need to log in before you can comment on or make changes to this bug.