From 92fe12a2f4b4da9f4b7200f84f7d2f2712fcf4ea Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 20 Sep 2026 20:58:10 -0400 Subject: [PATCH] [MG_Backend] (DirectGLES): the indexed client snapshot is monolith-only The backend draw entry points run on the apply thread when a transport is live, where MGB_CTX->GetBoundVertexArray() is a frontend read the server role must not make (Fatal{RoleViolation}) - which is what the split lane aborted on. With a transport the CLIENT owns those bytes and snapshots them from the GL thread, so the server has nothing to stage. --- MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp index 80429193..15580071 100644 --- a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp +++ b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp @@ -2462,6 +2462,12 @@ namespace MobileGL::MG_Backend::DirectGLES { GLsizei instanceCount, GLint baseVertex, Uint32 baseInstance, const void* clientIndices, Uint64 clientIndexBytes) { if (count <= 0 || instanceCount <= 0) return true; + // MONOLITH ONLY, and the gate is what keeps a live transport's apply thread out of + // the frontend VAO: with a transport the CLIENT owns those bytes and snapshots them + // from the GL thread (MG_Impl/Pipe/OwnedDrawInputs.h), so there is nothing for the + // server to stage - and reading MGB_CTX there is the role violation this family's + // other monolith glue is guarded against. + if (MG_Config::Transport != MG_Config::TransportMode::Monolith) return true; const auto& currentVAO = MGB_CTX->GetBoundVertexArray(); if (!currentVAO) return true;