Summary: | [GTK][WPE] Make ANGLE backend EGL context initialization work | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alejandro G. Castro <alex> | ||||||
Component: | New Bugs | Assignee: | Alejandro G. Castro <alex> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | clord, dino, ews-watchlist, glenn, jbedard, kondapallykalyan, webkit-bug-importer, zdobersek | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 237649 | ||||||||
Attachments: |
|
Description
Alejandro G. Castro
2022-05-11 12:43:50 PDT
Created attachment 459178 [details]
Patch
Comment on attachment 459178 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=459178&action=review > Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:222 > - m_displayObj = EGL_GetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, displayAttributes.data()); > + m_displayObj = EGL_GetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, PlatformDisplay::sharedDisplay().eglDisplay(), displayAttributes.data()); EGL_DEFAULT_DISPLAY is a native display identifier for the default display, it's cast to EGLNativeDisplayType. The change now pushes an EGLDisplay value into the EGL call, which is not how the entrypoint works. There has to be a different way taken of avoiding X11 in Mesa. (In reply to Zan Dobersek (Reviews) from comment #2) > Comment on attachment 459178 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=459178&action=review > > > Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:222 > > - m_displayObj = EGL_GetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, displayAttributes.data()); > > + m_displayObj = EGL_GetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, PlatformDisplay::sharedDisplay().eglDisplay(), displayAttributes.data()); > > EGL_DEFAULT_DISPLAY is a native display identifier for the default display, > it's cast to EGLNativeDisplayType. The change now pushes an EGLDisplay value > into the EGL call, which is not how the entrypoint works. There has to be a > different way taken of avoiding X11 in Mesa. Right, I made the mistake to think the Display was the same Egl display, but it is just used to make sure we return the same EGLDisplay for the same NativeDisplay; just tested even passing (void *) 1, makes the tests work, because it just stores the pointer as an Id and allows the code path to be different using a guessing function, avoiding the building default like when you pass EGL_DEFAULT_DISPLAY, which is 0x0. I can try and environment variable in the script to try to avoid it if I do not find other code path that can be used. Thanks for the review! Created attachment 459320 [details]
Patch
Committed r294245 (250603@main): <https://commits.webkit.org/250603@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 459320 [details]. |