From c984d9520595a741e68039d8a399c419209794e1 Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Fri, 25 Sep 2026 17:25:21 +0800 Subject: [PATCH] [Fix] (MG_Remote): CapsSnapshot.apiVersion carries the backend's own API version string, so a split client's GL_RENDERER names the real device instead of the target GL version (split build only; the pull build is unchanged, G1) - PublishCapsSnapshot filled that field with info.RendererGLInfo.TargetGLVersion.toString(). The client reads it back through BackendObject_Remote::GetBackendAPIVersionString (CapsMirror's ApiVersion) and prints it in the parentheses of GL_RENDERER, which is the only place a real device is named; a monolith build fills the same parentheses from the backend's own GetBackendAPIVersionString. A split client therefore answered "Espryt (MobileGL Core) (4.6.0)" where monolith answered "Espryt (MobileGL Core) (Adreno (TM) 750, OpenGL ES 3.2)". - The target version still crosses the wire inside the renderer-info blob (CapsCodec), which is where GL_VERSION reads it, so no reader loses it. - Content only: the field already existed and the blob layout is untouched, so the wire fingerprint needs no bump, and the file compiles only under MOBILEGL_BUILD_DISAGGREGATED. - Verified with a PC client against a phone server: Minecraft and Sodium both log "Espryt (MobileGL Core) (Adreno (TM) 750, OpenGL ES 3.2)". --- MobileGL/MG_Remote/Server/ServerSession.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Remote/Server/ServerSession.cpp b/MobileGL/MG_Remote/Server/ServerSession.cpp index dd9778d9..4bec1ed2 100644 --- a/MobileGL/MG_Remote/Server/ServerSession.cpp +++ b/MobileGL/MG_Remote/Server/ServerSession.cpp @@ -896,8 +896,14 @@ namespace MobileGL::MG_Remote::Server { builder.CreateVector(dynamicBytes, static_cast<::flatbuffers::uoffset_t>(sizeof(dynamic))); auto rendererVector = builder.CreateVector(renderer.data(), renderer.size()); auto formatsVector = builder.CreateVector(formats.data(), formats.size()); - const RendererInfo& info = m_backend->GetRendererInfo(); - auto apiVersion = builder.CreateString(info.RendererGLInfo.TargetGLVersion.toString()); + // The client reads this back through BackendObject_Remote::GetBackendAPIVersionString() + // and prints it in the parentheses of GL_RENDERER, so it has to be the BACKEND's own API + // version string - the same one a monolith build puts in those parentheses - and not the + // target GL version this build aims for. Filling it with TargetGLVersion.toString() is + // what made a split client answer "Espryt (MobileGL Core) (4.6.0)" where monolith + // answered "Espryt (MobileGL Core) (, OpenGL ES .)", + // i.e. it dropped the only place the real device was named. + auto apiVersion = builder.CreateString(m_backend->GetBackendAPIVersionString()); auto snapshot = ::MobileGL::Wire::CreateCapsSnapshot( builder, dynamicVector, rendererVector, formatsVector, /*extensions=*/0, apiVersion, callMask, static_cast(m_backend->GetBackendType()));