[MG_Backend, MG_Test] (P12): the server backend's destruction drops every Espryt twin under a transport, so the in-process display server's next session no longer adopts the ended session's programs, VAOs and buffers (split build only; the pull build is unchanged, G1)

This commit is contained in:
2026-09-24 00:40:35 -04:00
parent 984db45576
commit c2758abdf9
4 changed files with 125 additions and 0 deletions
@@ -893,6 +893,12 @@ namespace MobileGL::MG_Backend::DirectGLES {
DestroyEGLContext();
#if MOBILEGL_BUILD_DISAGGREGATED
NoteNativeContextGone();
// P12: under a transport this object is the SERVER's backend and its destruction is the
// end of a session (ServerLoop's apply thread, after the final drain). The in-process
// display server runs the next session in this same process, so the twins this one built
// - naming ids of the context just destroyed - must not answer for the next client's
// handles (Managers.h, DropEveryTwinForEndedServerSession). Monolith keeps its twins.
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) DropEveryTwinForEndedServerSession();
#endif
}