[Fix] (EGL): keep a process the vendor does not serve from opening its log

This commit is contained in:
2026-10-02 20:07:15 -04:00
parent 4f679d669d
commit 3d69c37504
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -40,7 +40,9 @@ namespace MobileGL::MG_Impl::EGLImpl {
EGLStateContext* GetState() {
if (!MG_State::pEGLContext) {
MGLOG_E_ONCE("pEGLContext is null. MG_State may not be initialized.");
// Not an error by itself: a dispatcher calls every vendor's per-thread and error
// entry points, including a vendor that never served this process.
MGLOG_D("pEGLContext is null. MG_State may not be initialized.");
}
return MG_State::pEGLContext.get();
}
@@ -360,7 +360,10 @@ extern "C" MOBILEGL_EGL_API EGLBoolean __egl_Main(uint32_t version, const __EGLa
imports->getDispatchAddress = VendorGetDispatchAddress;
imports->setDispatchIndex = VendorSetDispatchIndex;
MGLOG_I("glvnd vendor: MobileGL is serving EGL through libglvnd (ABI %u.%u, platforms: %s)",
// DEBUG, not INFO: as the system's vendor this runs in every EGL process, including the many
// that end up served by another vendor, and the first line a process logs opens (and
// truncates) its log file - one it may share with the process that launched it.
MGLOG_D("glvnd vendor: MobileGL is serving EGL through libglvnd (ABI %u.%u, platforms: %s)",
static_cast<unsigned>(EGL_VENDOR_ABI_MAJOR_VERSION), static_cast<unsigned>(EGL_VENDOR_ABI_MINOR_VERSION),
kPlatformExtensions);
return EGL_TRUE;