[Feat] (MG_Remote): fence polls are answered from the server's reports - the apply thread posts kEventFenceSignaled as the GPU finishes each client fence (and submits and re-checks while idle), glClientWaitSync(0) / glGetSynciv answer locally, and only every MOBILEGL_IPC_POLL_ESCALATE-th unanswered poll crosses

This commit is contained in:
2026-09-29 03:59:44 -04:00
parent de33d40173
commit bcff9b00cc
18 changed files with 538 additions and 17 deletions
@@ -1128,6 +1128,22 @@ namespace MobileGL::MG_Remote::Server {
PublishEvents();
}
void ServerSession::PostFenceSignaled(MG_Pipe::MGPipeHandle fence) {
if (!m_accepted) {
MGLOG_E_ONCE("MG_Remote server: PostFenceSignaled {%u, %u} before Accept - dropped, "
"there is no SEG_EVENT to carry it on",
fence.Slot, fence.Gen);
return;
}
void* slot = ReserveEventOrBlock(*this, Transport::kEventFenceSignaled, "kEventFenceSignaled",
sizeof(Transport::EventFenceSignaledHead));
Transport::EventFenceSignaledHead head{};
head.Fence.Slot = fence.Slot;
head.Fence.Gen = fence.Gen;
std::memcpy(slot, &head, sizeof(head));
PublishEvents();
}
// PH-6 (ID-P7-2). THE FIRST DROP, AND THE LATCH IT RAISES.
//
// Logged ONCE, by name, with everything a triage needs: which event, how big, what the