mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[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)".
This commit is contained in:
@@ -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) (<real GLES renderer>, OpenGL ES <major>.<minor>)",
|
||||
// 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<Uint32>(m_backend->GetBackendType()));
|
||||
|
||||
Reference in New Issue
Block a user