From 3d69c375049fd762f697272de61527e5ccf59b9a Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Fri, 2 Oct 2026 20:07:15 -0400 Subject: [PATCH] [Fix] (EGL): keep a process the vendor does not serve from opening its log --- MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp | 4 +++- MobileGL/MG_Impl/EGLImpl/Exporting/GlvndVendor.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp b/MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp index e9496b42..c7dee0a1 100644 --- a/MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp +++ b/MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp @@ -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(); } diff --git a/MobileGL/MG_Impl/EGLImpl/Exporting/GlvndVendor.cpp b/MobileGL/MG_Impl/EGLImpl/Exporting/GlvndVendor.cpp index 8c1be751..9e607d3d 100644 --- a/MobileGL/MG_Impl/EGLImpl/Exporting/GlvndVendor.cpp +++ b/MobileGL/MG_Impl/EGLImpl/Exporting/GlvndVendor.cpp @@ -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(EGL_VENDOR_ABI_MAJOR_VERSION), static_cast(EGL_VENDOR_ABI_MINOR_VERSION), kPlatformExtensions); return EGL_TRUE;