[Webkit-unassigned] [Bug 249125] [GTK] WebGL not availalbe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 22 07:39:40 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=249125

--- Comment #5 from Michael Catanzaro <mcatanzaro at gnome.org> ---
(In reply to Carlos Garcia Campos from comment #3)
> Ok, we need to figure out why ANGLE fails to to initialize EGL, because
> GLContextEGL is not failing. First I would check the error generated by
> mFnPtrs->initializePtr in FunctionsEGL::initialize(). That can fail with
> EGL_BAD_DISPLAY or EGL_NOT_INITIALIZED.

It's 0x3001 EGL_NOT_INITIALIZED, which is not super informative.

But I added this not very useful change:

diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
index d3061b57a2b7..c2fd90cd1991 100644
--- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
+++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
@@ -174,7 +174,7 @@ FunctionsEGL::~FunctionsEGL()
 {
     SafeDelete(mFnPtrs);
 }
-
+#include <stdio.h>
 egl::Error FunctionsEGL::initialize(EGLNativeDisplayType nativeDisplay)
 {
 #define ANGLE_GET_PROC_OR_ERROR(MEMBER, NAME)                                           \
@@ -213,7 +213,8 @@ egl::Error FunctionsEGL::initialize(EGLNativeDisplayType nativeDisplay)
     mEGLDisplay = mFnPtrs->getDisplayPtr(nativeDisplay);
     if (mEGLDisplay != EGL_NO_DISPLAY)
     {
-        if (mFnPtrs->initializePtr(mEGLDisplay, &majorVersion, &minorVersion) != EGL_TRUE)
+auto ret = mFnPtrs->initializePtr(mEGLDisplay, &majorVersion, &minorVersion);
+        if (ret != EGL_TRUE)
         {
             return egl::Error(mFnPtrs->getErrorPtr(), "Failed to initialize system egl");
         }

That change sure looks like it should do nothing, but for whatever reason it changes the behavior of the calling function Display::initialize, which prints a detailed error only if I make that change:

ERR: Display.cpp:1021 (initialize): ANGLE Display::initialize error 12289: EGL >= 1.4 is required

So ANGLE thinks the EGL version is too old, but webkit://gpu reports EGL_VERSION is 1.5.

> I would also check where we are
> creating the context, it could be either
> GraphicsContextGLGBM::platformInitializeContext() or
> GraphicsContextGLFallback::platformInitializeContext() although EGL is
> initialized with the default display and the same parameters in both cases.

Mine is happening in GraphicsContextGLGBM::platformInitializeContext.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221222/cd1bb6bc/attachment-0001.htm>


More information about the webkit-unassigned mailing list