From 32d27b14914c70a27c93aab52a830fc82a0a0a1f Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 4 Oct 2026 07:19:23 -0400 Subject: [PATCH] [Fix] (DirectGLES): a session's backend registration no longer trips the strict apply-thread pin while another session is applying --- MobileGL/MG_Backend/DirectGLES/Managers.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Backend/DirectGLES/Managers.cpp b/MobileGL/MG_Backend/DirectGLES/Managers.cpp index 447f5fd8..649d7ff7 100644 --- a/MobileGL/MG_Backend/DirectGLES/Managers.cpp +++ b/MobileGL/MG_Backend/DirectGLES/Managers.cpp @@ -3903,8 +3903,13 @@ namespace MobileGL::MG_Backend::DirectGLES { MG_Pipe::MGPipeSetResourceOps(&g_glesResourceOps); #endif // Frontend writes issued while ops were unregistered advanced change - // serials with no per-op bump; re-open every draw-clean memo. - BumpBufferMutationEpoch(); + // serials with no per-op bump; re-open every draw-clean memo. Advanced directly, + // past BumpBufferMutationEpoch's apply-thread pin: a registration mutates no buffer + // and only makes every memo probe again, and with several sessions in one process + // a new session's backend registers on its own thread while another session's + // apply thread is already running - which the pin would otherwise read as a + // client-thread producer and, under the strict lane, abort the server for. + g_bufferMutationEpoch.fetch_add(1, std::memory_order_release); } void UnregisterBufferBackendOps() {