mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-17 06:53:22 +09:00
[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:
@@ -284,4 +284,23 @@ namespace MobileGL::MG_Remote::Client {
|
||||
GLsizei drawCount, GLsizei stride,
|
||||
GLintptr parameterOffset, Bool hasParameterBuffer);
|
||||
|
||||
// ---- P10 (CONTRACT-P10.md §1): fence polls answered from the reverse channel ----------
|
||||
//
|
||||
// The event drain's half: the server reported `fence` signaled (kEventFenceSignaled). Every
|
||||
// later glClientWaitSync / glGetSynciv(GL_SYNC_STATUS) on it answers without a round trip.
|
||||
void NoteFenceSignaledByServer(MG_Pipe::MGPipeHandle fence);
|
||||
|
||||
// What the fence polls cost, for the lanes. `LocalAnswers` = polls answered with no record
|
||||
// (signaled or not); `Escalations` = zero-timeout polls that had gone unanswered
|
||||
// MOBILEGL_IPC_POLL_ESCALATE times in a row and took a round trip; `RoundTrips` = every
|
||||
// fence answer that crossed (escalations, non-zero timeouts, POLL_ESCALATE=0);
|
||||
// `ServerReports` = kEventFenceSignaled records consumed.
|
||||
struct FencePollCounters {
|
||||
Uint64 LocalAnswers = 0;
|
||||
Uint64 Escalations = 0;
|
||||
Uint64 RoundTrips = 0;
|
||||
Uint64 ServerReports = 0;
|
||||
};
|
||||
FencePollCounters ReadFencePollCounters();
|
||||
|
||||
} // namespace MobileGL::MG_Remote::Client
|
||||
|
||||
Reference in New Issue
Block a user