mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-19 16:01:57 +09:00
[Fix] (EGL): a second display is served, and glvnd gets its answers from one table
Two defects, both found by asking the client directly rather than by reading its log. The backend refused to initialize any EGLDisplay but the first - "already bound to a different EGLDisplay" - and the field it compared against has no reader anywhere else in the tree: the domain rule was the whole of the rule. What it cost was a compositor, which asks for the display it will draw into AFTER probing another one. The probe succeeded, the real display was refused, and the caller reported the refusal one layer up as "no usable DRM render device" - a message that names where it stopped, not why. The second: glvnd asks a vendor for entry points from two places. getProcAddress is how it builds its own static EGL table, and getDispatchAddress is how it answers eglGetProcAddress for every name it does not know itself - which is every extension entry point, the device queries among them. This side answered the second from a GL-only table, so an application asking for eglQueryDeviceStringEXT got a null for a function the vendor implements.
This commit is contained in:
@@ -172,11 +172,15 @@ namespace MobileGL::MG_Backend {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_eglDisplayInitialized && m_eglDisplay != dpy) {
|
||||
MGLOG_E("InitializeEGLDisplay failed: backend already bound to a different EGLDisplay");
|
||||
return false;
|
||||
}
|
||||
|
||||
// A DISPLAY IS A CONNECTION, NOT A RESOURCE THIS BACKEND OWNS, and refusing the second one
|
||||
// refused a caller for a reason that is not there: the surface and context tables are keyed
|
||||
// by the display each was created on, every operation carries its own display handle, and
|
||||
// this field has no reader anywhere - it was the whole of the rule.
|
||||
//
|
||||
// What the rule cost was a compositor. One asks for the display it will draw into AFTER
|
||||
// probing another, so the second eglInitialize is the one that matters, and a refusal there
|
||||
// is reported one layer up as "no usable DRM render device" - the probe having succeeded
|
||||
// and the real display having failed, with nothing in between that says which was refused.
|
||||
m_eglDisplay = dpy;
|
||||
m_eglDisplayInitialized = true;
|
||||
if (major) {
|
||||
|
||||
Reference in New Issue
Block a user