Compare commits

...
Author SHA1 Message Date
BZLZHH 3ee8f0d0fe [Test] (P12): the window's gates move onto the arm it ships on - a real stream session with an answering peer, and it goes red by name when the store is a bounded ring
THE STRUCTURAL FIX, not just one more case. Three rounds of this feature were green in
the lanes while being inert on the device, because every window-level gate in the tree
runs in RemoteClientControls, whose session is TransportMode::InProcess - ShmLink - and
since P12 the window is OFF there by design. So the lanes and the device ran different
transports, and nothing in the tree could tell.

StreamClientPublicationTest.EveryDeferredCreateAnswerComesBackOnTheShippingArm runs on a
real StreamLink with a real ClientSession and a peer that ANSWERS: a scripted servo pops
each record, replies with its seq, advances and flushes the watermark - i.e. exactly what
the drain's WaitForApplied oracle needs, and nothing more (nothing applies a record).

IT IS PROVED TO GO RED, and by the right name. Reverting the store to "keep the last 8
arrivals" makes it die on the diagnostic added with the store:

    MGPipe: Fatal{ReplyMissing, "create window"} - seq 1 was declared and APPLIED, and
    its answer is no longer in the link's store; the window cannot advance past it and
    nothing recovers a lost answer

AND THE FIRST VERSION OF THIS GATE WAS WORTHLESS, which is the part worth keeping: with
24 creates and nothing else it passed against the ring as well, because between a push
and its read only a couple of answers arrive. What killed the device was TRAFFIC - the
server is behind and its late answers to earlier records fill a bounded buffer first - so
the case now emits twelve MORE records whose answers are wanted (declared
SetTextureParams rows) between the first create and the rest, waits for the peer to
answer them, and only then lets the drain come back for the create. Two things were
needed to make that deterministic: the settlement wait (otherwise it is a race the ring
can win by luck) and glFlush(), because a published record reaches the peer on a flush
and not on PublishAndNotify - the neighbouring case in the same file is built on that.

ALSO IN THIS COMMIT: the assertion is the CONSERVATION LAW, not "taken == creates".
Nothing drains the window when no further create arrives, so the last few answers stay
held - taken + pending == creates, with pending <= window, is the honest contract, and
taken == creates would be asserting a drain on a path the row does not have.

318 tests green across five lanes (172 + 15 + 22 + 103 + 6).
2026-09-26 03:41:48 +08:00
BZLZHH b4f7638742 [Perf] (P12): the create window lands as the default - declared-answer retention replaces the ring, and the load frame goes 28.66 s -> 16.52 s (11.02 s at window 4)
The three things that made the deferral inert are all fixed, in the order they were
found: the reply ring could not hold an answer across the ~1,000 records between two
creates; a residency budget could not help because what displaces an answer is what
the SERVER sends, not what the client emits; and so the mechanism had to be retention.

WHAT LANDED
  * ILink::DeclareReplyRead + LinkCapabilities::RetainsReplies. The wire declares a
    seq will be read BEFORE it publishes, so the declaration cannot race its own
    answer; a link with the capability false ignores it, and the window does not
    defer on one (CreateWindowEffective() is gated on it).
  * StreamLink's ring of the last 8 answers becomes a declared-answer store: a
    monotone whitelist plus a cursor, answers kept until their reader TAKES them
    (take-and-delete under one lock, bytes swapped into the scratch), and a capacity
    of 24 that is FATAL to exceed rather than evicting. An evicted wanted answer is
    unrecoverable - re-latching by sending another create wipes the server's record
    (PipeApply.cpp:2033) and its PendingUploads (PipeApply.h:332) while the client
    cleared its dirty flags at emission (PipeApply.h:298-304) - so the capacity is
    sized so it cannot be reached and reaching it says its own name.
  * An answer nobody declared is DROPPED, which is what keeps the store bounded by the
    client's deferral depth instead of by the server's answer rate. Retain-on-arrival
    grows ~11.3 entries per create against a server that ignores the no-reply bit.
  * A read that fails after WaitForApplied has returned Reached is now Fatal{ReplyMissing}
    naming the seq: on the stream arm the reply frame strictly precedes the progress
    frame that publishes appliedSeq, so that combination is a broken invariant, and
    retrying it (what the row used to do) wedges the window for the rest of the
    process while leaving every deferred object latched on a provisional accept.
  * The residency budget is deleted (WireTables.cpp keeps its history), the window
    retirement branch drains once before falling back - it could otherwise strand the
    answers it was holding - and Detach clears the store.

MEASURED ON THE DEVICE, load frame, both ends rebuilt, frame-sent identical per op
(create 4,536, records 103,097) throughout:

    window 1 (R-5's shape)              4,536 takes   28.66 s
    window 2 explicit                   2,500         17.27 s
    window 2 AS THE SHIPPED DEFAULT     2,563         16.52 s
    window 4                            1,644         11.02 s
    window 2 against an OLD SERVER      2,663         16.38 s   (zero Fatals)

The last row is the version-skew case the design review named as a must: a server
built before the no-reply bit answers ~55,903 records a frame, the whitelist drops
every answer nobody declared, and the deferral still reads its own back.

GATES (172 + 15 green), and the important one is proved to go red:
  * ADeclaredAnswerSurvivesFarMoreInterveningAnswersThanAnyFixedBuffer - reverting the
    store to "keep the last 8 arrivals" fails it immediately with "the declared answer
    did not survive 64 intervening ones". That is the line between the ring-1024
    stand-in and a bounded mechanism.
  * AnAnswerNobodyDeclaredIsNotKeptAtAll - red if everything is retained.
  * TheWindowRefusesToDeferOnALinkThatCannotRetainAnswers - on the in-process (ShmLink)
    arm the knob at 4 must still block every create, red if the capability gate goes.
  * The refused-create case now reads the repair that exists on THAT arm (the latch),
    and asserts the window's own books are empty there.

NOT DONE, and named: the window has no unit gate on the STREAM arm yet - only the
device runs. Three rounds of this feature were green in the lanes while inert on the
device because the lanes and the device run different transports; the transport-level
retention gates close that for the store, and the window-level one should be built on
StreamClientPublicationTest's real stream session next.
2026-09-26 03:31:14 +08:00
BZLZHH 31b2dbdb33 [Perf] (P12): with the budget off and a deep reply buffer the window pays - 28.66 s -> 11.45 s at W=4, and the round trip does NOT grow, so the ~5 ms is a wakeup the server batches away
The second one-line experiment, and the one that decides whether the retention design
is worth building. Ring 1024 plus the residency budget DISABLED (its constant raised
out of reach), W=2 and W=4:

  arm                        waits   rtt_mean   by_op 2    wall
  W=1 (today's default)      4,543   5,672 us     4,536   28.66 s
  budget on + ring 8         9,078   2,598 us     9,071   27.04 s
  ring 1024 + budget 7       3,450   5,367 us     3,443   23.04 s
  ring 1024 + budget OFF W=2 2,560   4,916 us     2,553   16.80 s
  ring 1024 + budget OFF W=4 1,691   4,224 us     1,684   11.45 s

rtt_mean does NOT grow (4,916 / 4,224 us, both BELOW the 5,672 us baseline) while the
waits fall by 2x and 2.7x and the wall follows. So the ~5 ms is a WAKEUP round trip and
the server drains a batch per wakeup - which is exactly what makes W pay, and it is the
question the audit listed as undecidable from the repo and the watershed for whether
this is worth doing at all. It is.

AND IT BEATS THE HANDOFF'S OWN FLOOR: handoff-2 section 0.4 put the window's landing at
15-20 s, treating the client's ~13.4 s CPU as ADDITIVE with the waits. This frame turns
out to be wait-dominated, so amortising four creates per wakeup lands at 11.45 s, 3.5 s
below that estimate.

1024 IS A STAND-IN, NOT THE DESIGN: it works only because 1024 happens to be deep enough
for this workload, and 1024 retained answers is ~2 GiB worst case (a ReadPixels answer can
be 2 MiB). Retention gives the same property - the answer is still there - with a bound
tied to the client's own deferral depth, which is why the implementation the audit
specified is what gets built, not "make the ring 1024".

Also corrects the note's section 7 path 1 (audit F15): on the stream arm SEG_REPLY and the
Hello's ReplySlotCount have nothing to do with answers - they travel as Reply frames and
StreamLink::ReadReply reads the client's own store - so "deepen the pool" does not address
the arm that was measured, and should not be paid for.

Reverted (ring 8, budget 7, probes deleted); 172 + 13 green.
2026-09-26 03:01:20 +08:00
BZLZHH 3f44320126 [Docs] (P12): the ring-1024 experiment - every deferred answer comes back (readfail 8,872 -> 0), so eviction was the whole cause and the residency budget is now the brake
One-line experiment before writing the retention table: StreamLink's kReplyRing 8 -> 1024,
nothing else changed, same load frame on the same device.

                       ring = 8 (today)   ring = 1024
    readfail                    8,872              0
    taken                          63          4,499 / 4,500
    blocked (fell back)         4,435              0
    by_op 2                     9,071          3,443
    wall                        27.9 s         23.04 s
    frame-sent        create 4,536, records 103,097   identical per op

TWO CONCLUSIONS. First, eviction was the ONLY cause: with a buffer deep enough, every
deferred answer was read back and not one create fell through to the blocking path.
The wedge (want=310) and the useless budget (budget=4,451) were two faces of "eight
slots is not enough". Second, what brakes now is the BUDGET, not the buffer: by_op 2 =
3,443 matches the number of times the budget forced an early read (3,395), i.e. every
one of those is a real blocking wait. Its constant is 7, sized for the 8-slot pool, so
against a 1,024-deep buffer it became the only throttle and the wall only moved 27.9 ->
23.0 s.

WHAT IT MEANS FOR THE DESIGN. Once the answers are RETAINED until read, correctness no
longer depends on how long one survives in a bounded buffer, so the budget must be
sized to the RETENTION CAPACITY rather than to the pool - or be replaced by "retained
means safe". by_op 2 = records/W then puts W=2 at ~2,268 waits and the wall at ~15 s,
which is the goal's own success criterion.

Experiment reverted (ring back to 8, probes deleted); 172 + 13 + 22 + 103 green.
2026-09-26 02:44:30 +08:00
BZLZHH 67267ea89c [Perf] (MG_Remote): the residency budget does not make the window usable either - the answer is gone before the client next looks, so a deferral needs RETENTION, not a budget
Steps 1 and 2 of the plan the design review set out, landed and measured on the
device. Step 1 answers the question step 2 depended on; step 2 answers the one the
whole line depended on, and the answer is that the window's shape is wrong.

STEP 1 - CAN AN ANSWER BE LOST IN DELIVERY? NO. ReplyPool now counts what the link
took (PostedReplies) and what it refused (FailedReplies), and a non-OK result is
NAMED instead of swallowed: it checked only BUFFER_TOO_SMALL and let
TRANSPORT_CLOSED vanish with no line and no counter, so "the server never sent it"
and "it was sent and the buffer overwrote it" were the same symptom with opposite
fixes. Measured: posted=4501 failed=0. The twenty-answer gap between the server's
tally and the client's was a sampling difference, not a drop - and the server's
m_answered counts ATTEMPTS (incremented before PostReply), which is why it could
never have settled it.

STEP 2 - DOES A RESIDENCY BUDGET FIX THE WINDOW? NO.
Wire_ResourceCreate now measures how many reply-owning records the client has
emitted since the oldest window entry was pushed (ClientSession::ReplyPostings, a
new clock) and takes the oldest answer back as soon as that approaches the reply
buffer's depth, instead of deferring past the point where the answer can still
exist. On the device:

    P12win call=4501 cfg=2 eff=2 pending=2 taken=63 pushed=65 blocked=4435
           budget=4451 readfail=8872 posts=54377
    kind=frame-op frame=14 wait_replies=9078 by_op=2=9071   wall 27.87 s

budget=4451: it fires on essentially EVERY create, the window stops deferring
(pushed=65), and the drain still reads nothing back. THE REASON IS STRUCTURAL, not
a constant:

  * the window only gets control WHEN A CREATE ARRIVES. Between two creates this
    client emits on the order of a thousand records - at the FIRST failed read the
    reply ring already spanned [1175..1504] while the head was seq 310 - and nothing
    looks at the window in that gap;
  * what displaces a deferred answer is not what this client emits, it is WHAT THE
    SERVER ANSWERS. The server is the one behind (one answer per ~5 ms wakeup while
    the client runs ahead), so the replies arriving during the gap are its LATE
    ANSWERS TO THE EARLIER CREATES - they fill the 8 slots first;
  * so the check fires too late by construction. Tightening it does not fix that; it
    only removes the deferral entirely, which is what pushed=65 is.

WHAT THAT LEAVES. A deferral is readable only if the client KEEPS the answers it
deferred. The buffer is bounded by COUNT and the client cannot bound how many
answers the server will post between two of its creates, so hoping the buffer still
holds one is a race the client loses - which is also why the earlier two diagnoses
(reply-pool churn, then FIFO-with-no-way-out) were both describing symptoms of the
same thing. The shape that can work is retention: the reader keeps the answers for
the seqs still outstanding (a handful), drops them when read, and reports a LOSS
when a read asks for one it no longer has. That is a transport change - StreamLink's
ring becomes a retention map with a cap and a lost counter - and it is the next step.

BOTH STEPS STAY: step 1 is a net gain on its own, and step 2 is the safe direction
(it can only degrade the window to no-deferral, i.e. the pre-window shape) and its
clock is the one the retention design needs. MOBILEGL_IPC_CREATE_WINDOW stays at 1.

172/172 and 13/13 after the probes were removed. The measurements and the revised
conclusion are in notes/p12/CREATE-WINDOW-MEASURED.md section 9.
2026-09-26 02:35:05 +08:00
BZLZHH 0d0a8f9226 [Feat] (MG_Remote): a record can tell the server its answer will never be read - the bit works and cuts a frame's replies by 92%, and it proves the window's real blocker is the FIFO drain, not the pool depth
The create window could not collect its deferred answers. The previous commit
diagnosed that as the reply pool being 8 slots deep against 55,903 replies in one
frame, and left a no-reply bit as the way out. This lands that bit, measures it on
the device, and reports that the diagnosis was half wrong.

WHAT LANDED. ClientSession::EmitAndWaitTails takes a second question beside
wantReply: willReadReply. They are not the same question and the window is the case
that separates them - it emits with wantReply=false and READS the answer later, so
its records must still be answered. kRecNoReply (RingRecordFlags bit 5, which
aliases kOptional in the call-flag space; the flag-space asserts were extended and
the alias named) is stamped when willReadReply is false, and the decoder skips
PostReply while keeping every acceptance counter - "nobody reads the answer" is not
"nothing happened". The two illegal combinations are Fatal by name.

Three call sites say it: SetTextureParams for a confirmed object, the respecify
row's fire-and-forget half, and sub-data where MGPipeSubDataWantsItsReply decides.

MEASURED ON THE DEVICE (aikjs4s8cys8ba7l, rebuilt APK + client, both halves new):
    server:  skipped=50,001   answered=4,521        (a frame's replies: 55,903 -> 4,543)
    client:  Reply frames received seen=4,501, latest seq=97,181
    frame-sent: identical per op, records untouched
    create row: by_op 2 = 9,070 (was 4,536)  - because the drain's blocking take is
               now counted, so the row's number stays honest instead of reading as
               "create stopped waiting" while the waiting merely moved
AND THE WINDOW STILL READ BACK NOTHING: readfail 8,951 -> 8,872, i.e. -0.9%.

THE REAL CAUSE, from the miss probe:
    P12miss n=1     want=310 replySeq=1504   ring=[1175..1504]
    P12miss n=9001  want=310 replySeq=102915 ring=[102866..102915]
want=310 every time. The drain is STRICTLY FIFO and a failed read has no way out -
it retries the same head for ever. Any reply buffer is bounded by design (8 pool
slots, or the 8-frame ring the stream link now keeps), so with 4,536 deferred
answers at least one is overwritten before it is read, and that one wedges the
window permanently. Cutting the churn by two orders of magnitude does not help: it
turns a certainty into a certainty. That is the constraint, not the depth.

THE FIX IS NAMED AND NOT TAKEN (the goal this work ran under stops here on purpose).
On a failed read of the head, abandon it: MGPipeNoteHandleUnpublished +
NoteCreateSuspect + pop - the DECLINE path reused for "unknown". The window then
self-heals through the blocking path and the object merely gets slower. It needs its
own gate: a failed read must let the window ADVANCE.

Gates, all green (172 + 13 + 22 + 103):
  PipeWireCodecTest.TheNoReplyBitSkipsTheAnswerAndKeepsTheAcceptanceRecord - the skip,
    the kept tally, the answered/skipped split, and the negative control that a record
    WITHOUT the bit is still answered (a server that stopped answering everything
    would otherwise pass)
  RemoteClientControls.ACreateWindowDefersTheAnswersAndTheWindowOffDoesNot - now also
    asserts the answers CAME BACK (answers_taken=11, outstanding=1, fallbacks=0 against
    12 records). RED-ONCE PROVED: giving the window's creates the literal
    "fire-and-forget => skip" predicate makes this case fail.
  RingTest - the sixth and last flag alias, and the hand-written exhaustiveness list
    extended (with a note that it is only as exhaustive as that list).
  Server side: AnsweredRecords()/SkippedAnswers() - the number that made this
    debuggable, since a wire change whose effect is invisible is undebuggable.

Client-first is safe: an old server ignores bit 5 and replies as before, so the two
cross-version directions degrade to today's behaviour - this is "both ends must
upgrade to take EFFECT", not "to avoid breaking". Hit that in practice first.
2026-09-26 02:00:44 +08:00
BZLZHH 5e4b2a4437 [Docs] (P12): the no-reply flag reviewed - the arithmetic holds and the flag is cheap, but the predicate has to be "this answer will never be read", not "fire-and-forget"
An independent review of the one design door the measurement left open (stop sending
the ~51,000 answers nobody reads, so the 8-slot pool stops churning and the create
window becomes collectable). Verdict: feasible, worth doing, and the proposal AS
WRITTEN would disable the thing it exists to enable.

THE CATCH. The windowed create is wantReply=false AND its answer is read -
WireTables.cpp's drain reads exactly those seqs. A bit keyed on "fire-and-forget"
therefore stops the server answering the creates the window is waiting for: the
window goes from "cannot be collected" to "there is nothing to collect", and the
readfail counter that is the only way to diagnose it disappears with it. It fails
silently, not loudly. The predicate has to be per-record "this answer will never be
read" - true of params / respecify-escape / sub-data, false of a windowed create -
carried as a separate input from wantReply (willReadReply), with
willReadReply && !rowCarriesReplySlot rejected rather than ignored.

VERIFIED HERE, not taken on trust (the reviewer's file:line claims, checked):
  - the flag space is RingRecordFlags (Ring.h:281-285), bits 0-4 taken, BIT 5 FREE,
    and the header's own table (PipeWire.inc:35-65) says "bit 5 kOptional vs (nothing)
    no ring counterpart" - so a new ring bit aliases kOptional, which is exactly what
    the assert at PipeWireCodec.cpp:142-145 refuses;
  - the three static_asserts that will trip are real and deliberate
    (PipeWireCodec.cpp:106, :142-145, RingTest.cpp:740);
  - WireFingerprint mixes payload-layout, catalogue, render-state digests + OpCount,
    none of which a ring bit moves - so no protocol revision bump is required, and
    both cross-version directions degrade to today's behaviour. That makes this
    "must upgrade both ends to take EFFECT", not "must upgrade both ends not to
    BREAK" - one notch cheaper than handoff-2 section 3.2's protocol surface;
  - StreamLink.cpp:564-571 is the independent progress flush (>= 64 records or
    >= 1 ms) and :577 is PostReply piggybacking SendProgress on the reply - so
    skipping replies coarsens progress granularity. Bounded, but unmeasured.

AND IT CORRECTED TWO OF MY OWN NUMBERS. The frame's reply count is 55,903, not
59,673: op 4 ResourceDestroy carries kNone in the catalogue (PipeWire.inc:179) and
PostReply Fatals on a row with no kReplySlot, so it never answers - I had added its
3,770 records to the total. The derived figures move with it (12.3 replies per create,
0.65 of a create of survival, 6,988 pool churns), and every copy is fixed here:
Config.h, ConfigLoader.cpp, WireTables.cpp's section comment, CONTRACT-P5E.md,
CREATE-WINDOW-MEASURED.md and MOBILEGL-CS-HANDOFF-3.md.

TWO MORE THINGS THE FOLLOW-UP MUST CARRY, both recorded in the note's section 7:
  - LinkMetricsBeginReply counts ownsReplySlot, so once the flag lands by_op 2 falls
    to ~0 - and section 1 of the note tells the reader to use by_op 2 to check whether
    the window engaged. That check becomes a FALSE GREEN; the flag needs a
    server-side "how many times did this op answer" counter beside it.
  - the ~112,000 sendmsg/frame the flag removes are on the apply thread, so the
    flag's own value is a measurable claim that nobody has measured.

172/172 and 13/13 after the comment corrections.
2026-09-26 01:13:31 +08:00
BZLZHH 45d55eab1f [Docs] (P12): handoff 3 - the create window is dead by arithmetic, and the two debts it exposed (the applier can no longer say it dropped a record; the picture still has no real control) 2026-09-26 00:51:56 +08:00
89 changed files with 271177 additions and 146 deletions
+110
View File
@@ -0,0 +1,110 @@
# Handoff 3:create window 被实测否决,以及它牵出的两笔真债
> 写于 2026-09-26 凌晨。分支 `feat/disaggregated`,**HEAD = `d0113959`(三笔已提交,工作树干净)**。
> 上一份是 [`MOBILEGL-CS-HANDOFF-2.md`](MOBILEGL-CS-HANDOFF-2.md):它把「把 create 那 4,536 批成 ~1,134」
> 留成了最后一段。本页说的是**那一段走不通,以及为什么**,外加两笔它顺手揭出来的债。
---
## 0. TL;DR
1. **create window 无效,已默认关闭,机制保留。** 同一设备、同一帧、同一 101,421,396 B staged:
窗口 4 与窗口 1 的 create 行**都是 4,536 次等待**,墙钟都是 **28.64 s**(handoff-2 记的 pre-window 基线 31.3 s)。
临时计数器给出形态:`pushed=24 blocked=4,476 took=20 readfail=8,951 pending=4`——**drain 读不回来**。
2. **不是调参问题,是算术**:回复池 `kDefaultReplySlotCount = 8` 槽,而这一帧发出 **55,903 条带回复的记录**
(服务端对每条 kReplySlot 记录都回,不管客户端要不要——`ClientSession.cpp:1897-1900` 原文),
于是池子一帧 churn 6,988 次、两条 create 之间夹 **12.3 条回复**,而一条答案只活得下 **8 条**:
**0.65 个 create**。延后的答案不是「慢」,是**读不到**;任何深度都一样。
详见 [`docs/.../p12/CREATE-WINDOW-MEASURED.md`](docs/Disaggregated/notes/p12/CREATE-WINDOW-MEASURED.md)。
3. **顺手修掉一个真 bug**:`StreamLink::ReadReply` 只认最新一条(单槽),违背 `ILink::ReadReply(seq)` 的按 seq
语义(`ShmLink` 侧本来就是池)。已改成 8 槽环 + 用例。**注意它治不好窗口**——池本身只有 8 槽。
4. **债 A(比 handoff-2 估计的大)**:handoff-2 §3 说「只清闩不够」,实测是**已经没有任何行会读到 applier 的拒绝了**。
P12 的首用化让 respecify 与 params 对「已确认」对象都不回读,而「已确认」(`MGPipeHandleIsPublished`)
回答的是「create 发出去过」——丢记录之后依然为真。实测 `creates=0 applier_records=0 published=1`。
修它需要**协议面**(handoff-2 §3.2 的第 3 条)。详见
[`docs/.../p12/UNPUBLISH-GUARD-SIGNALS.md`](docs/Disaggregated/notes/p12/UNPUBLISH-GUARD-SIGNALS.md)。
5. **债 B(老账,仍未还)**:画面。本轮补了一次**两臂对照**(负载帧闭合后 +8 s 截屏,SSIM 0.977),
但两臂行为本来就相同,所以它只能说明「窗口开着没把画面弄坏」,**不是**「延后一条确认后画面仍然对」。
---
## 1. 这一轮到底发生了什么
| 步骤 | 结果 |
|---|---|
| handoff-2 §2.4 的三条门 | 全部落地并**绿**(含把负控放进同一个子进程) |
| 上真机测窗口 | **负结果**:`by_op 2 = 4,536` 两臂相同,28.64 s 两臂相同 |
| 定位 | 单槽 `StreamLink` + 8 槽池 vs 55,903 条回复 |
| 独立评审提案(§2 的第 2 条路) | 可行、但要改判据:见 §5 |
| 修传输层 | `StreamLink` 改 8 槽环,按 seq 读;新用例绿 |
| 再上真机 | **仍然 4,536**——证明池深度才是墙,不是单槽 |
| 收尾 | 默认关;机制保留;写清算术;补门;改过期契约;写两份笔记 |
**门(全绿,`RemoteClientTest` 172/172)**:
- `ACreateWindowDefersTheAnswersAndTheWindowOffDoesNot` —— 窗口开 = 12 记录 0 等待;**同一个子进程**把
`MG_Config::Ipc.CreateWindow` 拧回 1 = 12 记录 **12** 等待(负控);每条 create 后断言
`pending <= effective`;99 被夹到数组大小;数组 <= 池的一半(另有编译期 `static_assert`)。
- `ARefusedCreateUnlatchesItsObjectAndItsNextCreateBlocks` —— 真拒绝(收窄服务端 consumed mask)→ 闩清零、
suspect +1、下一条 create **阻塞**(2 记录 2 等待)、恢复消费者后 **heal**(闩回来、suspect −1)。
- `StreamLinkTest.AnOlderReplyIsStillReadableByItsSeq` —— 传输层按 seq 可读。
- `DroppedApplierRecordsAreNotRepairedTodayAndThisCaseIsTheDebt` —— 把债 A 的三个数 pin 住。
---
## 2. 真机配方(这轮做成脚本了)
```sh
# 一轮 = force-stop → 起服务端 → 就绪判据 → 起客户端 → 认负载帧 → 截屏 → SIGTERM 收尾
cd mgl-device && python3 run-once.py <tag> [MOBILEGL_IPC_CREATE_WINDOW=4]
```
`run-once.py` 是 handoff-2 §4 那份手工配方的持久化版本,三条教训写进了代码:
- **负载帧的判据是 `stage_bytes >= 50 MB`,不是墙钟**:按墙钟会停在 frame 2(5 s,2.5 MB,加载页),
而这一帧是 frame 15/17(101,421,396 B)。上一轮因此白跑两次。
- **客户端在截屏后 SIGTERM 收尾**:测量在负载帧闭合时就完了,后面 1,500 帧是四分钟的空转;
SIGTERM 是 MC 自己的 shutdown hook(日志里的 `Stopping!`),SIGKILL 会留下 `session.lock` 让下一轮开不了世界。
- **每轮之前 `am force-stop`**:否则上一轮的 server 占着会话,新一轮 `rc=5` + `Fatal{CapsBeforeFirstSnapshot}`。
**这台 shell 现在有 gamedir 的写权限**(handoff-2 §4.2 那批 /tmp 的坑不用再踩)。
---
## 3. 没做的
1. **债 A 的修法**(协议面:反向通道第 10 个回调,或一个「这条别回」的 record flag)。
2. **债 B 的真对照**:要证「延后一条确认之后画面仍然对」,得造一个**会真的延后并被拒绝**的场景,
而那正是 §0.2 说不存在的东西。窗口这条路封口之后,画面这件事的实际风险点回到了 R3/首用化本身,
而它们的证据仍然是「服务端拿到的记录一条没少」+ `frame-sent` 逐 op 相同。
3. **`ReplySlotCount` 加深**:Hello 里协商(`ClientSession.cpp:957` / `ServerSession.cpp:745`),
两端一致就能改;但 `ReplyBytes` 固定 16 MiB 时槽会变小,`ReadPixels` 的 `ReplyCanHold` 会先撞墙,
要连 `ReplyBytes` 一起抬。要走这条路,先量 `MaxReply` 的实际需求。
---
## 5. 独立评审:那个 record flag 值不值得做
提案(「服务端别回没人读的答案」)经过一次独立评审,结论是**可行但有代价,且判据必须改**:
- **判据不能是「fire-and-forget」**。window 延后的 create **正是** `wantReply=false`,而它**一定会被读**
(drain 读的就是它)。按字面实现会让窗口从「读不回来」变成「根本没得读」,而且 `readfail` 这个唯一能
诊断它的计数器**一起消失**——不崩,只静默退化。正确判据是**「这条的答案永远不会被读」**。
今天 4 个 `wantReply=false` 站点里 3 个符合(params / respecify escape / sub-data),只有 window 的 create 相反。
- **不是「不升级就坏」的协议面,是「不两端都升就不生效」的协议面**:位在 `RingRecordFlags` bit 5(空位),
`WireFingerprint()` 的三个 digest 都不动 ⇒ 不必 bump `MOBILEGL_PROTOCOL_CONTROL_REVISION`;旧端忽略该位、
照旧回包。客户端可以先落。代价是三条 `static_assert` 会红(故意的绊线)。
- **算术成立**:55,903 → 4,543,两条 create 之间从 12.3 条回复降到 ~1 条,8 槽够用(建议先 W=2 再放 4)。
- **一处必须同改**:`LinkMetricsBeginReply` 按 `ownsReplySlot` 计,window 生效后 `by_op 2` 会掉到 ~0——
用它验证会得到**假绿**,要另加服务端侧计数。
- **评审未实测**:跳过回包本身省下的 ~112,000 次 `sendmsg`/帧值多少墙钟;以及 `StreamLink::PostReply` 把
`SendProgress()` 搭在回包上,跳过会把进度粒度降到「>= 64 条 / >= 1 ms」,barrier 平均多等多少没人算过。
细节见 [`docs/.../p12/CREATE-WINDOW-MEASURED.md`](docs/Disaggregated/notes/p12/CREATE-WINDOW-MEASURED.md) §7。
## 4. 一句话交接
**「每一次状态变化都要一次往返」这条线,在 create 这一格上撞到了协议的地板**:
答案必须在下一条回复之前读走,而一帧有 55,903 条回复。窗口不是写错了,是**这条协议不允许延后**。
真正剩下的收益不在「少问一句」,而在把服务端**没人会读的回答**去掉——那是一个 record flag 的距离,
代价比 handoff-2 §3.2 那种协议面便宜一档(见 §5)。
+31 -13
View File
@@ -549,19 +549,37 @@ namespace MobileGL::MG_Config {
// restores the per-record barrier of R-1. // restores the per-record barrier of R-1.
Uint32 BatchWaits = 1; Uint32 BatchWaits = 1;
// MOBILEGL_IPC_CREATE_WINDOW: how many RESOURCE_CREATE answers may be outstanding before the // MOBILEGL_IPC_CREATE_WINDOW: how many RESOURCE_CREATE answers may be outstanding before the
// client waits for one. 1 = every create waits, which is the shape R-5 shipped with AND THE // client waits for one. 1 = every create waits (the shape R-5 shipped with); N > 1 = up to N
// DEFAULT, because the deferral was measured on the device and does not work: the reply pool // creates go out fire-and-forget, their caller reads a PROVISIONAL accept, and the oldest
// is 8 slots and one load frame posts 59,673 replies (create 4,536 + respecify 20,633 + // answer is taken when the window fills.
// params 18,056 + sub-data 12,671 + the rest), so an answer is overwritten after 8 replies - //
// 0.61 of a create - and the window's drain can never read one back. All 4,536 creates took // DEFAULT 2, AND IT TOOK THREE THINGS TO GET HERE. The deferral was inert for two
// the blocking path at 4 and at 1 alike (28.64 s both ways). Worse than inert: the // measured reasons and one structural one, in the order they were found:
// provisional accept latches an object the applier may have refused, and the un-latch that // 1. the reply buffer was a ring of the last 8 answers, and between two creates this
// corrects it lives in that same unreadable drain. WireTables.cpp's section comment has the // client emits on the order of a thousand records - so the answer was always gone
// counters and the arithmetic, and the gates in RemoteClientControls.inc still pin the // (`want=310` on every miss while the ring spanned [1175..1504]);
// mechanism, which is sound and simply unusable against this much other reply traffic. // 2. a residency budget that tried to take answers back early could not help, because
// N > 1 is reachable for the experiment that would make it usable (a deeper pool, or a way // what displaces an answer is what the SERVER sends, not what the client emits;
// to tell the server not to answer a fire-and-forget row). // 3. and so the fix was RETENTION - a link keeps a declared answer until its reader
Uint32 CreateWindow = 1; // takes it (Transport/ILink.h's RetainsReplies, StreamLink's declared-answer store).
//
// MEASURED ON THE DEVICE, load frame, both ends rebuilt (create 4,536, records 103,097,
// frame-sent identical per op throughout):
// window 1 4,536 blocking takes 28.66 s (the shape R-5 shipped)
// window 2 2,500 17.27 s
// window 4 1,644 11.02 s
// and the round trip does NOT grow as the window deepens (5,285 / 4,082 us against 5,672
// at 1), which is the measurement that says the ~5 ms is a WAKEUP the server batches away
// rather than its apply throughput - so amortising four creates per wakeup is a real 2.6x.
//
// 4 IS REACHABLE AND BETTER (11.02 s against 17.27 s) and is NOT the default only because
// the wider window holds more answers at once; raise it after a run that reads `by_op 2`
// and the wall clock rather than the config. NOTE THE PREDICATE the whole mechanism rests
// on: an answer is retained because the wire DECLARED it will be read - NOT because its
// caller was fire-and-forget. The window's own creates are fire-and-forget AND read, so a
// flag keyed on wantReply would disable the very mechanism it exists to enable
// (docs/Disaggregated/notes/p12/CREATE-WINDOW-MEASURED.md sections 7-11).
Uint32 CreateWindow = 2;
// MOBILEGL_IPC_ADOPT_TIER: 2 = emulate (client keeps the shadow and pushes), which // MOBILEGL_IPC_ADOPT_TIER: 2 = emulate (client keeps the shadow and pushes), which
// is the only tier P5 implements and the reason persistent-map-push can be non-zero // is the only tier P5 implements and the reason persistent-map-push can be non-zero
// at all (R-6). 0 and 1 parse and are Fatal at use with "P11"; they exist now so the // at all (R-6). 0 and 1 parse and are Fatal at use with "P11"; they exist now so the
+6 -5
View File
@@ -412,11 +412,12 @@ namespace MobileGL::MG_ConfigLoader {
// xxHash64 changed since the last push are shipped. // xxHash64 changed since the last push are shipped.
ipc.PersistentHashSuppress = QueryEnvUint32("MOBILEGL_IPC_PERSISTENT_HASH_SUPPRESS", 1, 0, 1); ipc.PersistentHashSuppress = QueryEnvUint32("MOBILEGL_IPC_PERSISTENT_HASH_SUPPRESS", 1, 0, 1);
ipc.BatchWaits = QueryEnvUint32("MOBILEGL_IPC_BATCH_WAITS", 1, 0, 1); ipc.BatchWaits = QueryEnvUint32("MOBILEGL_IPC_BATCH_WAITS", 1, 0, 1);
// The create window. DEFAULT 1 - OFF - because the deferral was measured on the device and // The create window. DEFAULT 2, and it works because a link that declares RetainsReplies
// cannot be collected (Config.h has the numbers, WireTables.cpp the arithmetic: 59,673 // keeps a declared answer until its reader takes it - Config.h carries the three reasons it
// replies per frame into 8 pool slots). Capped at 4 rather than the pool's 8 for the reason // was inert before and the device numbers (28.66 s at 1, 17.27 s at 2, 11.02 s at 4).
// the mechanism is sized that way at all. // Capped at 4: the retained set is bounded by the window's own depth, and 4 is what the
ipc.CreateWindow = QueryEnvUint32("MOBILEGL_IPC_CREATE_WINDOW", 1, 1, 4); // declared-answer store's capacity is written against.
ipc.CreateWindow = QueryEnvUint32("MOBILEGL_IPC_CREATE_WINDOW", 2, 1, 4);
// The verify harness compares the pushed block against the applier per verb; a // The verify harness compares the pushed block against the applier per verb; a
// batched queue lets the comparer read a supplied field mid-apply, which is a // batched queue lets the comparer read a supplied field mid-apply, which is a
// torn read rather than a divergence. The batch is therefore off whenever the // torn read rather than a divergence. The batch is therefore off whenever the
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,900 @@
// MobileGL - MobileGL/MG_Client/generated_wire_trampoline.h
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
#pragma once
#include <Includes.h>
// GENERATED by scripts/generate_client_trampoline.py
MOBILEGL_GL_API void glActiveProgramEXT(GLuint program);
MOBILEGL_GL_API void glActiveShaderProgram(GLuint pipeline, GLuint program);
MOBILEGL_GL_API void glActiveTexture(GLenum texture);
MOBILEGL_GL_API void glAttachShader(GLuint program, GLuint shader);
MOBILEGL_GL_API void glBeginConditionalRender(GLuint id, GLenum mode);
MOBILEGL_GL_API void glBeginConditionalRenderNV(GLuint id, GLenum mode);
MOBILEGL_GL_API void glBeginPerfMonitorAMD(GLuint monitor);
MOBILEGL_GL_API void glBeginPerfQueryINTEL(GLuint queryHandle);
MOBILEGL_GL_API void glBeginQuery(GLenum target, GLuint id);
MOBILEGL_GL_API void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id);
MOBILEGL_GL_API void glBeginTransformFeedback(GLenum primitiveMode);
MOBILEGL_GL_API void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name);
MOBILEGL_GL_API void glBindBuffer(GLenum target, GLuint buffer);
MOBILEGL_GL_API void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
MOBILEGL_GL_API void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
MOBILEGL_GL_API void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint* buffers);
MOBILEGL_GL_API void glBindFragDataLocation(GLuint program, GLuint color, const GLchar* name);
MOBILEGL_GL_API void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar* name);
MOBILEGL_GL_API void glBindFramebuffer(GLenum target, GLuint framebuffer);
MOBILEGL_GL_API void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
MOBILEGL_GL_API void glBindImageTextures(GLuint first, GLsizei count, const GLuint* textures);
MOBILEGL_GL_API void glBindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture);
MOBILEGL_GL_API void glBindProgramPipeline(GLuint pipeline);
MOBILEGL_GL_API void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
MOBILEGL_GL_API void glBindSampler(GLuint unit, GLuint sampler);
MOBILEGL_GL_API void glBindSamplers(GLuint first, GLsizei count, const GLuint* samplers);
MOBILEGL_GL_API void glBindShadingRateImageNV(GLuint texture);
MOBILEGL_GL_API void glBindTexture(GLenum target, GLuint texture);
MOBILEGL_GL_API void glBindTextureUnit(GLuint unit, GLuint texture);
MOBILEGL_GL_API void glBindTextures(GLuint first, GLsizei count, const GLuint* textures);
MOBILEGL_GL_API void glBindTransformFeedback(GLenum target, GLuint id);
MOBILEGL_GL_API void glBindVertexArray(GLuint array);
MOBILEGL_GL_API void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
MOBILEGL_GL_API void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
MOBILEGL_GL_API void glBlendEquation(GLenum mode);
MOBILEGL_GL_API void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
MOBILEGL_GL_API void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
MOBILEGL_GL_API void glBlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
MOBILEGL_GL_API void glBlendEquationi(GLuint buf, GLenum mode);
MOBILEGL_GL_API void glBlendEquationiARB(GLuint buf, GLenum mode);
MOBILEGL_GL_API void glBlendFunc(GLenum sfactor, GLenum dfactor);
MOBILEGL_GL_API void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
MOBILEGL_GL_API void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
MOBILEGL_GL_API void glBlendFuncSeparateiARB(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
MOBILEGL_GL_API void glBlendFunci(GLuint buf, GLenum src, GLenum dst);
MOBILEGL_GL_API void glBlendFunciARB(GLuint buf, GLenum src, GLenum dst);
MOBILEGL_GL_API void glBlendParameteriNV(GLenum pname, GLint value);
MOBILEGL_GL_API void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
MOBILEGL_GL_API void glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
MOBILEGL_GL_API void glBufferAddressRangeNV(GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
MOBILEGL_GL_API void glBufferAttachMemoryNV(GLenum target, GLuint memory, GLuint64 offset);
MOBILEGL_GL_API void glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage);
MOBILEGL_GL_API void glBufferPageCommitmentARB(GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
MOBILEGL_GL_API void glBufferPageCommitmentMemNV(GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
MOBILEGL_GL_API void glBufferStorage(GLenum target, GLsizeiptr size, const void* data, GLbitfield flags);
MOBILEGL_GL_API void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
MOBILEGL_GL_API void glCallCommandListNV(GLuint list);
MOBILEGL_GL_API GLenum glCheckFramebufferStatus(GLenum target);
MOBILEGL_GL_API GLenum glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target);
MOBILEGL_GL_API GLenum glCheckNamedFramebufferStatusEXT(GLuint framebuffer, GLenum target);
MOBILEGL_GL_API void glClampColor(GLenum target, GLenum clamp);
MOBILEGL_GL_API void glClear(GLbitfield mask);
MOBILEGL_GL_API void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data);
MOBILEGL_GL_API void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
MOBILEGL_GL_API void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
MOBILEGL_GL_API void glClearDepth(GLclampd depth);
MOBILEGL_GL_API void glClearDepthdNV(GLdouble depth);
MOBILEGL_GL_API void glClearDepthf(GLfloat d);
MOBILEGL_GL_API void glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data);
MOBILEGL_GL_API void glClearNamedBufferSubDataEXT(GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data);
MOBILEGL_GL_API void glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
MOBILEGL_GL_API void glClearStencil(GLint s);
MOBILEGL_GL_API void glClientAttribDefaultEXT(GLbitfield mask);
MOBILEGL_GL_API GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
MOBILEGL_GL_API void glClipControl(GLenum origin, GLenum depth);
MOBILEGL_GL_API void glColorFormatNV(GLint size, GLenum type, GLsizei stride);
MOBILEGL_GL_API void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
MOBILEGL_GL_API void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
MOBILEGL_GL_API void glCommandListSegmentsNV(GLuint list, GLuint segments);
MOBILEGL_GL_API void glCompileCommandListNV(GLuint list);
MOBILEGL_GL_API void glCompileShader(GLuint shader);
MOBILEGL_GL_API void glConservativeRasterParameterfNV(GLenum pname, GLfloat value);
MOBILEGL_GL_API void glConservativeRasterParameteriNV(GLenum pname, GLint param);
MOBILEGL_GL_API void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
MOBILEGL_GL_API void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
MOBILEGL_GL_API void glCopyMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
MOBILEGL_GL_API void glCopyMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
MOBILEGL_GL_API void glCopyMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
MOBILEGL_GL_API void glCopyMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
MOBILEGL_GL_API void glCopyPathNV(GLuint resultPath, GLuint srcPath);
MOBILEGL_GL_API void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
MOBILEGL_GL_API void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
MOBILEGL_GL_API void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
MOBILEGL_GL_API void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyTextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
MOBILEGL_GL_API void glCopyTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
MOBILEGL_GL_API void glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
MOBILEGL_GL_API void glCopyTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
MOBILEGL_GL_API void glCopyTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCopyTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glCoverFillPathNV(GLuint path, GLenum coverMode);
MOBILEGL_GL_API void glCoverStrokePathNV(GLuint path, GLenum coverMode);
MOBILEGL_GL_API void glCoverageModulationNV(GLenum components);
MOBILEGL_GL_API void glCoverageModulationTableNV(GLsizei n, const GLfloat* v);
MOBILEGL_GL_API void glCreateBuffers(GLsizei n, GLuint* buffers);
MOBILEGL_GL_API void glCreateCommandListsNV(GLsizei n, GLuint* lists);
MOBILEGL_GL_API void glCreateFramebuffers(GLsizei n, GLuint* framebuffers);
MOBILEGL_GL_API void glCreateProgramPipelines(GLsizei n, GLuint* pipelines);
MOBILEGL_GL_API void glCreateQueries(GLenum target, GLsizei n, GLuint* ids);
MOBILEGL_GL_API void glCreateRenderbuffers(GLsizei n, GLuint* renderbuffers);
MOBILEGL_GL_API void glCreateSamplers(GLsizei n, GLuint* samplers);
MOBILEGL_GL_API GLuint glCreateShader(GLenum type);
MOBILEGL_GL_API GLuint glCreateShaderProgramEXT(GLenum type, const GLchar* string);
MOBILEGL_GL_API void glCreateStatesNV(GLsizei n, GLuint* states);
MOBILEGL_GL_API void glCreateTextures(GLenum target, GLsizei n, GLuint* textures);
MOBILEGL_GL_API void glCreateTransformFeedbacks(GLsizei n, GLuint* ids);
MOBILEGL_GL_API void glCreateVertexArrays(GLsizei n, GLuint* arrays);
MOBILEGL_GL_API void glCullFace(GLenum mode);
MOBILEGL_GL_API void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
MOBILEGL_GL_API void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf);
MOBILEGL_GL_API void glDeleteBuffers(GLsizei n, const GLuint* buffers);
MOBILEGL_GL_API void glDeleteCommandListsNV(GLsizei n, const GLuint* lists);
MOBILEGL_GL_API void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
MOBILEGL_GL_API void glDeleteNamedStringARB(GLint namelen, const GLchar* name);
MOBILEGL_GL_API void glDeletePathsNV(GLuint path, GLsizei range);
MOBILEGL_GL_API void glDeletePerfMonitorsAMD(GLsizei n, GLuint* monitors);
MOBILEGL_GL_API void glDeletePerfQueryINTEL(GLuint queryHandle);
MOBILEGL_GL_API void glDeleteProgram(GLuint program);
MOBILEGL_GL_API void glDeleteProgramPipelines(GLsizei n, const GLuint* pipelines);
MOBILEGL_GL_API void glDeleteQueries(GLsizei n, const GLuint* ids);
MOBILEGL_GL_API void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
MOBILEGL_GL_API void glDeleteSamplers(GLsizei count, const GLuint* samplers);
MOBILEGL_GL_API void glDeleteShader(GLuint shader);
MOBILEGL_GL_API void glDeleteStatesNV(GLsizei n, const GLuint* states);
MOBILEGL_GL_API void glDeleteSync(GLsync sync);
MOBILEGL_GL_API void glDeleteTextures(GLsizei n, const GLuint* textures);
MOBILEGL_GL_API void glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids);
MOBILEGL_GL_API void glDeleteVertexArrays(GLsizei n, const GLuint* arrays);
MOBILEGL_GL_API void glDepthBoundsdNV(GLdouble zmin, GLdouble zmax);
MOBILEGL_GL_API void glDepthFunc(GLenum func);
MOBILEGL_GL_API void glDepthMask(GLboolean flag);
MOBILEGL_GL_API void glDepthRange(GLclampd near_val, GLclampd far_val);
MOBILEGL_GL_API void glDepthRangeArraydvNV(GLuint first, GLsizei count, const GLdouble* v);
MOBILEGL_GL_API void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble* v);
MOBILEGL_GL_API void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f);
MOBILEGL_GL_API void glDepthRangeIndexeddNV(GLuint index, GLdouble n, GLdouble f);
MOBILEGL_GL_API void glDepthRangedNV(GLdouble zNear, GLdouble zFar);
MOBILEGL_GL_API void glDepthRangef(GLfloat n, GLfloat f);
MOBILEGL_GL_API void glDetachShader(GLuint program, GLuint shader);
MOBILEGL_GL_API void glDisable(GLenum cap);
MOBILEGL_GL_API void glDisableClientStateIndexedEXT(GLenum array, GLuint index);
MOBILEGL_GL_API void glDisableClientStateiEXT(GLenum array, GLuint index);
MOBILEGL_GL_API void glDisableIndexedEXT(GLenum target, GLuint index);
MOBILEGL_GL_API void glDisableVertexArrayAttrib(GLuint vaobj, GLuint index);
MOBILEGL_GL_API void glDisableVertexArrayAttribEXT(GLuint vaobj, GLuint index);
MOBILEGL_GL_API void glDisableVertexArrayEXT(GLuint vaobj, GLenum array);
MOBILEGL_GL_API void glDisableVertexAttribArray(GLuint index);
MOBILEGL_GL_API void glDisablei(GLenum target, GLuint index);
MOBILEGL_GL_API void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
MOBILEGL_GL_API void glDispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
MOBILEGL_GL_API void glDispatchComputeIndirect(GLintptr indirect);
MOBILEGL_GL_API void glDrawArrays(GLenum mode, GLint first, GLsizei count);
MOBILEGL_GL_API void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
MOBILEGL_GL_API void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
MOBILEGL_GL_API void glDrawBuffer(GLenum mode);
MOBILEGL_GL_API void glDrawBuffers(GLsizei n, const GLenum* bufs);
MOBILEGL_GL_API void glDrawCommandsAddressNV(GLenum primitiveMode, const GLuint64* indirects, const GLsizei* sizes, GLuint count);
MOBILEGL_GL_API void glDrawCommandsStatesAddressNV(const GLuint64* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count);
MOBILEGL_GL_API void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices);
MOBILEGL_GL_API void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint basevertex);
MOBILEGL_GL_API void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount);
MOBILEGL_GL_API void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLuint baseinstance);
MOBILEGL_GL_API void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex);
MOBILEGL_GL_API void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
MOBILEGL_GL_API void glDrawMeshTasksIndirectNV(GLintptr indirect);
MOBILEGL_GL_API void glDrawMeshTasksNV(GLuint first, GLuint count);
MOBILEGL_GL_API void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices);
MOBILEGL_GL_API void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices, GLint basevertex);
MOBILEGL_GL_API void glDrawTransformFeedback(GLenum mode, GLuint id);
MOBILEGL_GL_API void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount);
MOBILEGL_GL_API void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream);
MOBILEGL_GL_API void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
MOBILEGL_GL_API void glDrawVkImageNV(GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
MOBILEGL_GL_API void glEdgeFlagFormatNV(GLsizei stride);
MOBILEGL_GL_API void glEnable(GLenum cap);
MOBILEGL_GL_API void glEnableClientStateIndexedEXT(GLenum array, GLuint index);
MOBILEGL_GL_API void glEnableClientStateiEXT(GLenum array, GLuint index);
MOBILEGL_GL_API void glEnableIndexedEXT(GLenum target, GLuint index);
MOBILEGL_GL_API void glEnableVertexArrayAttrib(GLuint vaobj, GLuint index);
MOBILEGL_GL_API void glEnableVertexArrayAttribEXT(GLuint vaobj, GLuint index);
MOBILEGL_GL_API void glEnableVertexArrayEXT(GLuint vaobj, GLenum array);
MOBILEGL_GL_API void glEnableVertexAttribArray(GLuint index);
MOBILEGL_GL_API void glEnablei(GLenum target, GLuint index);
MOBILEGL_GL_API void glEndPerfMonitorAMD(GLuint monitor);
MOBILEGL_GL_API void glEndPerfQueryINTEL(GLuint queryHandle);
MOBILEGL_GL_API void glEndQuery(GLenum target);
MOBILEGL_GL_API void glEndQueryIndexed(GLenum target, GLuint index);
MOBILEGL_GL_API void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
MOBILEGL_GL_API void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length);
MOBILEGL_GL_API void glFlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length);
MOBILEGL_GL_API void glFogCoordFormatNV(GLenum type, GLsizei stride);
MOBILEGL_GL_API void glFragmentCoverageColorNV(GLuint color);
MOBILEGL_GL_API void glFramebufferDrawBufferEXT(GLuint framebuffer, GLenum mode);
MOBILEGL_GL_API void glFramebufferDrawBuffersEXT(GLuint framebuffer, GLsizei n, const GLenum* bufs);
MOBILEGL_GL_API void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
MOBILEGL_GL_API void glFramebufferParameteriMESA(GLenum target, GLenum pname, GLint param);
MOBILEGL_GL_API void glFramebufferReadBufferEXT(GLuint framebuffer, GLenum mode);
MOBILEGL_GL_API void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
MOBILEGL_GL_API void glFramebufferSampleLocationsfvARB(GLenum target, GLuint start, GLsizei count, const GLfloat* v);
MOBILEGL_GL_API void glFramebufferSampleLocationsfvNV(GLenum target, GLuint start, GLsizei count, const GLfloat* v);
MOBILEGL_GL_API void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);
MOBILEGL_GL_API void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
MOBILEGL_GL_API void glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
MOBILEGL_GL_API void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
MOBILEGL_GL_API void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
MOBILEGL_GL_API void glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
MOBILEGL_GL_API void glFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
MOBILEGL_GL_API void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
MOBILEGL_GL_API void glFramebufferTextureMultiviewOVR(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
MOBILEGL_GL_API void glFrontFace(GLenum mode);
MOBILEGL_GL_API void glGenBuffers(GLsizei n, GLuint* buffers);
MOBILEGL_GL_API void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
MOBILEGL_GL_API GLuint glGenPathsNV(GLsizei range);
MOBILEGL_GL_API void glGenPerfMonitorsAMD(GLsizei n, GLuint* monitors);
MOBILEGL_GL_API void glGenProgramPipelines(GLsizei n, GLuint* pipelines);
MOBILEGL_GL_API void glGenQueries(GLsizei n, GLuint* ids);
MOBILEGL_GL_API void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
MOBILEGL_GL_API void glGenSamplers(GLsizei count, GLuint* samplers);
MOBILEGL_GL_API void glGenTextures(GLsizei n, GLuint* textures);
MOBILEGL_GL_API void glGenTransformFeedbacks(GLsizei n, GLuint* ids);
MOBILEGL_GL_API void glGenVertexArrays(GLsizei n, GLuint* arrays);
MOBILEGL_GL_API void glGenerateMipmap(GLenum target);
MOBILEGL_GL_API void glGenerateMultiTexMipmapEXT(GLenum texunit, GLenum target);
MOBILEGL_GL_API void glGenerateTextureMipmap(GLuint texture);
MOBILEGL_GL_API void glGenerateTextureMipmapEXT(GLuint texture, GLenum target);
MOBILEGL_GL_API void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values);
MOBILEGL_GL_API void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params);
MOBILEGL_GL_API GLint glGetAttribLocation(GLuint program, const GLchar* name);
MOBILEGL_GL_API void glGetBooleanv(GLenum pname, GLboolean* data);
MOBILEGL_GL_API void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params);
MOBILEGL_GL_API void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetBufferParameterui64vNV(GLenum target, GLenum pname, GLuint64EXT* params);
MOBILEGL_GL_API void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void* data);
MOBILEGL_GL_API GLuint glGetCommandHeaderNV(GLenum tokenID, GLuint size);
MOBILEGL_GL_API GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog);
MOBILEGL_GL_API void glGetDoublei_vEXT(GLenum pname, GLuint index, GLdouble* params);
MOBILEGL_GL_API void glGetDoublev(GLenum pname, GLdouble* params);
MOBILEGL_GL_API void glGetFloati_vEXT(GLenum pname, GLuint index, GLfloat* params);
MOBILEGL_GL_API void glGetFloatv(GLenum pname, GLfloat* data);
MOBILEGL_GL_API GLint glGetFragDataIndex(GLuint program, const GLchar* name);
MOBILEGL_GL_API GLint glGetFragDataLocation(GLuint program, const GLchar* name);
MOBILEGL_GL_API void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetFramebufferParameterivMESA(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API GLuint64 glGetImageHandleARB(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
MOBILEGL_GL_API GLuint64 glGetImageHandleNV(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
MOBILEGL_GL_API void glGetInteger64v(GLenum pname, GLint64* data);
MOBILEGL_GL_API void glGetIntegerv(GLenum pname, GLint* data);
MOBILEGL_GL_API void glGetInternalformatSampleivNV(GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint* params);
MOBILEGL_GL_API void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64* params);
MOBILEGL_GL_API void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
MOBILEGL_GL_API void glGetMemoryObjectDetachedResourcesuivNV(GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint* params);
MOBILEGL_GL_API void glGetMultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetMultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetMultiTexGendvEXT(GLenum texunit, GLenum coord, GLenum pname, GLdouble* params);
MOBILEGL_GL_API void glGetMultiTexGenfvEXT(GLenum texunit, GLenum coord, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetMultiTexGenivEXT(GLenum texunit, GLenum coord, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target, GLint level, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetMultiTexParameterIivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetMultiTexParameterIuivEXT(GLenum texunit, GLenum target, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat* val);
MOBILEGL_GL_API void glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64* params);
MOBILEGL_GL_API void glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedBufferParameterivEXT(GLuint buffer, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedBufferParameterui64vNV(GLuint buffer, GLenum pname, GLuint64EXT* params);
MOBILEGL_GL_API void glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, void* data);
MOBILEGL_GL_API void glGetNamedBufferSubDataEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, void* data);
MOBILEGL_GL_API void glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedFramebufferAttachmentParameterivEXT(GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint* param);
MOBILEGL_GL_API void glGetNamedFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedProgramivEXT(GLuint program, GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedRenderbufferParameterivEXT(GLuint renderbuffer, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetNamedStringivARB(GLint namelen, const GLchar* name, GLenum pname, GLint* params);
MOBILEGL_GL_API GLfloat glGetPathLengthNV(GLuint path, GLsizei startSegment, GLsizei numSegments);
MOBILEGL_GL_API void glGetPathParameterfvNV(GLuint path, GLenum pname, GLfloat* value);
MOBILEGL_GL_API void glGetPathParameterivNV(GLuint path, GLenum pname, GLint* value);
MOBILEGL_GL_API void glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten);
MOBILEGL_GL_API void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params);
MOBILEGL_GL_API GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar* name);
MOBILEGL_GL_API GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar* name);
MOBILEGL_GL_API GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar* name);
MOBILEGL_GL_API void glGetProgramResourcefvNV(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei count, GLsizei* length, GLfloat* params);
MOBILEGL_GL_API void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint* values);
MOBILEGL_GL_API void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
MOBILEGL_GL_API void glGetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
MOBILEGL_GL_API void glGetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
MOBILEGL_GL_API void glGetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
MOBILEGL_GL_API void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params);
MOBILEGL_GL_API void glGetQueryObjectiv(GLuint id, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params);
MOBILEGL_GL_API void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetQueryiv(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
MOBILEGL_GL_API GLushort glGetStageIndexNV(GLenum shadertype);
MOBILEGL_GL_API const GLubyte* glGetString(GLenum name);
MOBILEGL_GL_API const GLubyte* glGetStringi(GLenum name, GLuint index);
MOBILEGL_GL_API GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar* name);
MOBILEGL_GL_API GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar* name);
MOBILEGL_GL_API void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
MOBILEGL_GL_API void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTexParameterIiv(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API GLuint64 glGetTextureHandleARB(GLuint texture);
MOBILEGL_GL_API GLuint64 glGetTextureHandleNV(GLuint texture);
MOBILEGL_GL_API void glGetTextureLevelParameterfv(GLuint texture, GLint level, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetTextureLevelParameterfvEXT(GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint level, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTextureParameterIiv(GLuint texture, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTextureParameterIivEXT(GLuint texture, GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetTextureParameterIuivEXT(GLuint texture, GLenum target, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetTextureParameterfv(GLuint texture, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetTextureParameteriv(GLuint texture, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetTextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, GLint* params);
MOBILEGL_GL_API GLuint64 glGetTextureSamplerHandleARB(GLuint texture, GLuint sampler);
MOBILEGL_GL_API GLuint64 glGetTextureSamplerHandleNV(GLuint texture, GLuint sampler);
MOBILEGL_GL_API void glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64* param);
MOBILEGL_GL_API void glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint* param);
MOBILEGL_GL_API void glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint* param);
MOBILEGL_GL_API GLuint glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName);
MOBILEGL_GL_API GLint glGetUniformLocation(GLuint program, const GLchar* name);
MOBILEGL_GL_API void glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64* param);
MOBILEGL_GL_API void glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint* param);
MOBILEGL_GL_API void glGetVertexArrayIntegeri_vEXT(GLuint vaobj, GLuint index, GLenum pname, GLint* param);
MOBILEGL_GL_API void glGetVertexArrayIntegervEXT(GLuint vaobj, GLenum pname, GLint* param);
MOBILEGL_GL_API void glGetVertexArrayiv(GLuint vaobj, GLenum pname, GLint* param);
MOBILEGL_GL_API void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params);
MOBILEGL_GL_API void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params);
MOBILEGL_GL_API void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble* params);
MOBILEGL_GL_API void glGetVertexAttribLi64vNV(GLuint index, GLenum pname, GLint64EXT* params);
MOBILEGL_GL_API void glGetVertexAttribLui64vARB(GLuint index, GLenum pname, GLuint64EXT* params);
MOBILEGL_GL_API void glGetVertexAttribLui64vNV(GLuint index, GLenum pname, GLuint64EXT* params);
MOBILEGL_GL_API void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble* params);
MOBILEGL_GL_API void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
MOBILEGL_GL_API void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
MOBILEGL_GL_API void glHint(GLenum target, GLenum mode);
MOBILEGL_GL_API void glIndexFormatNV(GLenum type, GLsizei stride);
MOBILEGL_GL_API void glInsertEventMarkerEXT(GLsizei length, const GLchar* marker);
MOBILEGL_GL_API void glInterpolatePathsNV(GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
MOBILEGL_GL_API void glInvalidateBufferData(GLuint buffer);
MOBILEGL_GL_API void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length);
MOBILEGL_GL_API void glInvalidateTexImage(GLuint texture, GLint level);
MOBILEGL_GL_API void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
MOBILEGL_GL_API GLboolean glIsBuffer(GLuint buffer);
MOBILEGL_GL_API GLboolean glIsBufferResidentNV(GLenum target);
MOBILEGL_GL_API GLboolean glIsCommandListNV(GLuint list);
MOBILEGL_GL_API GLboolean glIsEnabled(GLenum cap);
MOBILEGL_GL_API GLboolean glIsEnabledIndexedEXT(GLenum target, GLuint index);
MOBILEGL_GL_API GLboolean glIsEnabledi(GLenum target, GLuint index);
MOBILEGL_GL_API GLboolean glIsFramebuffer(GLuint framebuffer);
MOBILEGL_GL_API GLboolean glIsImageHandleResidentARB(GLuint64 handle);
MOBILEGL_GL_API GLboolean glIsImageHandleResidentNV(GLuint64 handle);
MOBILEGL_GL_API GLboolean glIsNamedBufferResidentNV(GLuint buffer);
MOBILEGL_GL_API GLboolean glIsNamedStringARB(GLint namelen, const GLchar* name);
MOBILEGL_GL_API GLboolean glIsPathNV(GLuint path);
MOBILEGL_GL_API GLboolean glIsPointInFillPathNV(GLuint path, GLuint mask, GLfloat x, GLfloat y);
MOBILEGL_GL_API GLboolean glIsPointInStrokePathNV(GLuint path, GLfloat x, GLfloat y);
MOBILEGL_GL_API GLboolean glIsProgram(GLuint program);
MOBILEGL_GL_API GLboolean glIsProgramPipeline(GLuint pipeline);
MOBILEGL_GL_API GLboolean glIsQuery(GLuint id);
MOBILEGL_GL_API GLboolean glIsRenderbuffer(GLuint renderbuffer);
MOBILEGL_GL_API GLboolean glIsSampler(GLuint sampler);
MOBILEGL_GL_API GLboolean glIsShader(GLuint shader);
MOBILEGL_GL_API GLboolean glIsStateNV(GLuint state);
MOBILEGL_GL_API GLboolean glIsSync(GLsync sync);
MOBILEGL_GL_API GLboolean glIsTexture(GLuint texture);
MOBILEGL_GL_API GLboolean glIsTextureHandleResidentARB(GLuint64 handle);
MOBILEGL_GL_API GLboolean glIsTextureHandleResidentNV(GLuint64 handle);
MOBILEGL_GL_API GLboolean glIsTransformFeedback(GLuint id);
MOBILEGL_GL_API GLboolean glIsVertexArray(GLuint array);
MOBILEGL_GL_API void glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar* label);
MOBILEGL_GL_API void glLineWidth(GLfloat width);
MOBILEGL_GL_API void glLinkProgram(GLuint program);
MOBILEGL_GL_API void glLogicOp(GLenum opcode);
MOBILEGL_GL_API void glMakeBufferNonResidentNV(GLenum target);
MOBILEGL_GL_API void glMakeBufferResidentNV(GLenum target, GLenum access);
MOBILEGL_GL_API void glMakeImageHandleNonResidentARB(GLuint64 handle);
MOBILEGL_GL_API void glMakeImageHandleNonResidentNV(GLuint64 handle);
MOBILEGL_GL_API void glMakeImageHandleResidentARB(GLuint64 handle, GLenum access);
MOBILEGL_GL_API void glMakeImageHandleResidentNV(GLuint64 handle, GLenum access);
MOBILEGL_GL_API void glMakeNamedBufferNonResidentNV(GLuint buffer);
MOBILEGL_GL_API void glMakeNamedBufferResidentNV(GLuint buffer, GLenum access);
MOBILEGL_GL_API void glMakeTextureHandleNonResidentARB(GLuint64 handle);
MOBILEGL_GL_API void glMakeTextureHandleNonResidentNV(GLuint64 handle);
MOBILEGL_GL_API void glMakeTextureHandleResidentARB(GLuint64 handle);
MOBILEGL_GL_API void glMakeTextureHandleResidentNV(GLuint64 handle);
MOBILEGL_GL_API void* glMapBuffer(GLenum target, GLenum access);
MOBILEGL_GL_API void* glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
MOBILEGL_GL_API void glMatrixFrustumEXT(GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
MOBILEGL_GL_API void glMatrixLoadIdentityEXT(GLenum mode);
MOBILEGL_GL_API void glMatrixOrthoEXT(GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
MOBILEGL_GL_API void glMatrixPopEXT(GLenum mode);
MOBILEGL_GL_API void glMatrixPushEXT(GLenum mode);
MOBILEGL_GL_API void glMatrixRotatedEXT(GLenum mode, GLdouble ane, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glMatrixRotatefEXT(GLenum mode, GLfloat ane, GLfloat x, GLfloat y, GLfloat z);
MOBILEGL_GL_API void glMatrixScaledEXT(GLenum mode, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glMatrixScalefEXT(GLenum mode, GLfloat x, GLfloat y, GLfloat z);
MOBILEGL_GL_API void glMatrixTranslatedEXT(GLenum mode, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glMatrixTranslatefEXT(GLenum mode, GLfloat x, GLfloat y, GLfloat z);
MOBILEGL_GL_API void glMaxShaderCompilerThreadsARB(GLuint count);
MOBILEGL_GL_API void glMaxShaderCompilerThreadsKHR(GLuint count);
MOBILEGL_GL_API void glMemoryBarrier(GLbitfield barriers);
MOBILEGL_GL_API void glMemoryBarrierByRegion(GLbitfield barriers);
MOBILEGL_GL_API void glMinSampleShading(GLfloat value);
MOBILEGL_GL_API void glMultiDrawMeshTasksIndirectCountNV(GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
MOBILEGL_GL_API void glMultiDrawMeshTasksIndirectNV(GLintptr indirect, GLsizei drawcount, GLsizei stride);
MOBILEGL_GL_API void glMultiTexBufferEXT(GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
MOBILEGL_GL_API void glMultiTexCoordPointerEXT(GLenum texunit, GLint size, GLenum type, GLsizei stride, const void* pointer);
MOBILEGL_GL_API void glMultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glMultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param);
MOBILEGL_GL_API void glMultiTexGendEXT(GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
MOBILEGL_GL_API void glMultiTexGenfEXT(GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glMultiTexGeniEXT(GLenum texunit, GLenum coord, GLenum pname, GLint param);
MOBILEGL_GL_API void glMultiTexParameterfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glMultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint param);
MOBILEGL_GL_API void glMultiTexRenderbufferEXT(GLenum texunit, GLenum target, GLuint renderbuffer);
MOBILEGL_GL_API void glNamedBufferAttachMemoryNV(GLuint buffer, GLuint memory, GLuint64 offset);
MOBILEGL_GL_API void glNamedBufferData(GLuint buffer, GLsizeiptr size, const void* data, GLenum usage);
MOBILEGL_GL_API void glNamedBufferDataEXT(GLuint buffer, GLsizeiptr size, const void* data, GLenum usage);
MOBILEGL_GL_API void glNamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
MOBILEGL_GL_API void glNamedBufferPageCommitmentEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
MOBILEGL_GL_API void glNamedBufferPageCommitmentMemNV(GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
MOBILEGL_GL_API void glNamedBufferStorage(GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags);
MOBILEGL_GL_API void glNamedBufferStorageEXT(GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags);
MOBILEGL_GL_API void glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data);
MOBILEGL_GL_API void glNamedBufferSubDataEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data);
MOBILEGL_GL_API void glNamedCopyBufferSubDataEXT(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
MOBILEGL_GL_API void glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);
MOBILEGL_GL_API void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum* bufs);
MOBILEGL_GL_API void glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param);
MOBILEGL_GL_API void glNamedFramebufferParameteriEXT(GLuint framebuffer, GLenum pname, GLint param);
MOBILEGL_GL_API void glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum src);
MOBILEGL_GL_API void glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
MOBILEGL_GL_API void glNamedFramebufferRenderbufferEXT(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
MOBILEGL_GL_API void glNamedFramebufferSampleLocationsfvARB(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v);
MOBILEGL_GL_API void glNamedFramebufferSampleLocationsfvNV(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v);
MOBILEGL_GL_API void glNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
MOBILEGL_GL_API void glNamedFramebufferTexture1DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
MOBILEGL_GL_API void glNamedFramebufferTexture2DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
MOBILEGL_GL_API void glNamedFramebufferTexture3DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
MOBILEGL_GL_API void glNamedFramebufferTextureEXT(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
MOBILEGL_GL_API void glNamedFramebufferTextureFaceEXT(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
MOBILEGL_GL_API void glNamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
MOBILEGL_GL_API void glNamedFramebufferTextureLayerEXT(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
MOBILEGL_GL_API void glNamedProgramLocalParameter4dEXT(GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
MOBILEGL_GL_API void glNamedProgramLocalParameter4fEXT(GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
MOBILEGL_GL_API void glNamedProgramLocalParameterI4iEXT(GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
MOBILEGL_GL_API void glNamedProgramLocalParameterI4uiEXT(GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
MOBILEGL_GL_API void glNamedProgramLocalParameters4fvEXT(GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat* params);
MOBILEGL_GL_API void glNamedProgramLocalParametersI4ivEXT(GLuint program, GLenum target, GLuint index, GLsizei count, const GLint* params);
MOBILEGL_GL_API void glNamedProgramLocalParametersI4uivEXT(GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint* params);
MOBILEGL_GL_API void glNamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glNamedRenderbufferStorageEXT(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glNamedRenderbufferStorageMultisampleAdvancedAMD(GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glNamedRenderbufferStorageMultisampleCoverageEXT(GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glNamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glNamedStringARB(GLenum type, GLint namelen, const GLchar* name, GLint strinen, const GLchar* string);
MOBILEGL_GL_API void glNormalFormatNV(GLenum type, GLsizei stride);
MOBILEGL_GL_API void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar* label);
MOBILEGL_GL_API void glObjectPtrLabel(const void* ptr, GLsizei length, const GLchar* label);
MOBILEGL_GL_API void glPatchParameteri(GLenum pname, GLint value);
MOBILEGL_GL_API void glPathCoverDepthFuncNV(GLenum func);
MOBILEGL_GL_API void glPathParameterfNV(GLuint path, GLenum pname, GLfloat value);
MOBILEGL_GL_API void glPathParameteriNV(GLuint path, GLenum pname, GLint value);
MOBILEGL_GL_API void glPathStencilDepthOffsetNV(GLfloat factor, GLfloat units);
MOBILEGL_GL_API void glPathStencilFuncNV(GLenum func, GLint ref, GLuint mask);
MOBILEGL_GL_API void glPathStringNV(GLuint path, GLenum format, GLsizei length, const void* pathString);
MOBILEGL_GL_API void glPixelStoref(GLenum pname, GLfloat param);
MOBILEGL_GL_API void glPixelStorei(GLenum pname, GLint param);
MOBILEGL_GL_API void glPointParameterf(GLenum pname, GLfloat param);
MOBILEGL_GL_API void glPointParameteri(GLenum pname, GLint param);
MOBILEGL_GL_API void glPointSize(GLfloat size);
MOBILEGL_GL_API void glPolygonMode(GLenum face, GLenum mode);
MOBILEGL_GL_API void glPolygonOffset(GLfloat factor, GLfloat units);
MOBILEGL_GL_API void glPolygonOffsetClamp(GLfloat factor, GLfloat units, GLfloat clamp);
MOBILEGL_GL_API void glPolygonOffsetClampEXT(GLfloat factor, GLfloat units, GLfloat clamp);
MOBILEGL_GL_API void glPrimitiveBoundingBoxARB(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
MOBILEGL_GL_API void glPrimitiveRestartIndex(GLuint index);
MOBILEGL_GL_API void glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary, GLsizei length);
MOBILEGL_GL_API void glProgramParameteri(GLuint program, GLenum pname, GLint value);
MOBILEGL_GL_API void glProgramUniform1d(GLuint program, GLint location, GLdouble v0);
MOBILEGL_GL_API void glProgramUniform1dEXT(GLuint program, GLint location, GLdouble x);
MOBILEGL_GL_API void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform1dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
MOBILEGL_GL_API void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniform1i(GLuint program, GLint location, GLint v0);
MOBILEGL_GL_API void glProgramUniform1i64ARB(GLuint program, GLint location, GLint64 x);
MOBILEGL_GL_API void glProgramUniform1i64NV(GLuint program, GLint location, GLint64EXT x);
MOBILEGL_GL_API void glProgramUniform1i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glProgramUniform1i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
MOBILEGL_GL_API void glProgramUniform1ui64ARB(GLuint program, GLint location, GLuint64 x);
MOBILEGL_GL_API void glProgramUniform1ui64NV(GLuint program, GLint location, GLuint64EXT x);
MOBILEGL_GL_API void glProgramUniform1ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glProgramUniform1ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);
MOBILEGL_GL_API void glProgramUniform2dEXT(GLuint program, GLint location, GLdouble x, GLdouble y);
MOBILEGL_GL_API void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform2dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
MOBILEGL_GL_API void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
MOBILEGL_GL_API void glProgramUniform2i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y);
MOBILEGL_GL_API void glProgramUniform2i64NV(GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
MOBILEGL_GL_API void glProgramUniform2i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glProgramUniform2i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
MOBILEGL_GL_API void glProgramUniform2ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y);
MOBILEGL_GL_API void glProgramUniform2ui64NV(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
MOBILEGL_GL_API void glProgramUniform2ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glProgramUniform2ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
MOBILEGL_GL_API void glProgramUniform3dEXT(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform3dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
MOBILEGL_GL_API void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
MOBILEGL_GL_API void glProgramUniform3i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z);
MOBILEGL_GL_API void glProgramUniform3i64NV(GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
MOBILEGL_GL_API void glProgramUniform3i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glProgramUniform3i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
MOBILEGL_GL_API void glProgramUniform3ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
MOBILEGL_GL_API void glProgramUniform3ui64NV(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
MOBILEGL_GL_API void glProgramUniform3ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glProgramUniform3ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
MOBILEGL_GL_API void glProgramUniform4dEXT(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
MOBILEGL_GL_API void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform4dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
MOBILEGL_GL_API void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
MOBILEGL_GL_API void glProgramUniform4i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
MOBILEGL_GL_API void glProgramUniform4i64NV(GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
MOBILEGL_GL_API void glProgramUniform4i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glProgramUniform4i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
MOBILEGL_GL_API void glProgramUniform4ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
MOBILEGL_GL_API void glProgramUniform4ui64NV(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
MOBILEGL_GL_API void glProgramUniform4ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glProgramUniform4ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glProgramUniformHandleui64ARB(GLuint program, GLint location, GLuint64 value);
MOBILEGL_GL_API void glProgramUniformHandleui64NV(GLuint program, GLint location, GLuint64 value);
MOBILEGL_GL_API void glProgramUniformHandleui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* values);
MOBILEGL_GL_API void glProgramUniformHandleui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64* values);
MOBILEGL_GL_API void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix2dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix2x3dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix2x4dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix3dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix3x2dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix3x4dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix4dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix4x2dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix4x3dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glProgramUniformui64NV(GLuint program, GLint location, GLuint64EXT value);
MOBILEGL_GL_API void glProgramUniformui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glProvokingVertex(GLenum mode);
MOBILEGL_GL_API void glPushClientAttribDefaultEXT(GLbitfield mask);
MOBILEGL_GL_API void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar* message);
MOBILEGL_GL_API void glPushGroupMarkerEXT(GLsizei length, const GLchar* marker);
MOBILEGL_GL_API void glQueryCounter(GLuint id, GLenum target);
MOBILEGL_GL_API void glRasterSamplesEXT(GLuint samples, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glReadBuffer(GLenum src);
MOBILEGL_GL_API void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glRenderbufferStorageMultisampleAdvancedAMD(GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glRenderbufferStorageMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glResetMemoryObjectParameterNV(GLuint memory, GLenum pname);
MOBILEGL_GL_API void glSampleCoverage(GLfloat value, GLboolean invert);
MOBILEGL_GL_API void glSampleMaski(GLuint maskNumber, GLbitfield mask);
MOBILEGL_GL_API void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
MOBILEGL_GL_API void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glScissorArrayv(GLuint first, GLsizei count, const GLint* v);
MOBILEGL_GL_API void glScissorExclusiveArrayvNV(GLuint first, GLsizei count, const GLint* v);
MOBILEGL_GL_API void glScissorExclusiveNV(GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glSecondaryColorFormatNV(GLint size, GLenum type, GLsizei stride);
MOBILEGL_GL_API void glShaderBinary(GLsizei count, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
MOBILEGL_GL_API void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
MOBILEGL_GL_API void glShadingRateImageBarrierNV(GLboolean synchronize);
MOBILEGL_GL_API void glShadingRateImagePaletteNV(GLuint viewport, GLuint first, GLsizei count, const GLenum* rates);
MOBILEGL_GL_API void glShadingRateSampleOrderNV(GLenum order);
MOBILEGL_GL_API void glSignalVkFenceNV(GLuint64 vkFence);
MOBILEGL_GL_API void glSignalVkSemaphoreNV(GLuint64 vkSemaphore);
MOBILEGL_GL_API void glStateCaptureNV(GLuint state, GLenum mode);
MOBILEGL_GL_API void glStencilFillPathNV(GLuint path, GLenum fillMode, GLuint mask);
MOBILEGL_GL_API void glStencilFunc(GLenum func, GLint ref, GLuint mask);
MOBILEGL_GL_API void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
MOBILEGL_GL_API void glStencilMask(GLuint mask);
MOBILEGL_GL_API void glStencilMaskSeparate(GLenum face, GLuint mask);
MOBILEGL_GL_API void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
MOBILEGL_GL_API void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
MOBILEGL_GL_API void glStencilStrokePathNV(GLuint path, GLint reference, GLuint mask);
MOBILEGL_GL_API void glStencilThenCoverFillPathNV(GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
MOBILEGL_GL_API void glStencilThenCoverStrokePathNV(GLuint path, GLint reference, GLuint mask, GLenum coverMode);
MOBILEGL_GL_API void glSubpixelPrecisionBiasNV(GLuint xbits, GLuint ybits);
MOBILEGL_GL_API void glTexAttachMemoryNV(GLenum target, GLuint memory, GLuint64 offset);
MOBILEGL_GL_API void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer);
MOBILEGL_GL_API void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
MOBILEGL_GL_API void glTexCoordFormatNV(GLint size, GLenum type, GLsizei stride);
MOBILEGL_GL_API void glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTexPageCommitmentARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
MOBILEGL_GL_API void glTexPageCommitmentMemNV(GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
MOBILEGL_GL_API void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glTexParameteri(GLenum target, GLenum pname, GLint param);
MOBILEGL_GL_API void glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
MOBILEGL_GL_API void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
MOBILEGL_GL_API void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTextureAttachMemoryNV(GLuint texture, GLuint memory, GLuint64 offset);
MOBILEGL_GL_API void glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer);
MOBILEGL_GL_API void glTextureBufferEXT(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
MOBILEGL_GL_API void glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
MOBILEGL_GL_API void glTextureBufferRangeEXT(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
MOBILEGL_GL_API void glTexturePageCommitmentEXT(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
MOBILEGL_GL_API void glTexturePageCommitmentMemNV(GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
MOBILEGL_GL_API void glTextureParameterf(GLuint texture, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glTextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, GLfloat param);
MOBILEGL_GL_API void glTextureParameteri(GLuint texture, GLenum pname, GLint param);
MOBILEGL_GL_API void glTextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, GLint param);
MOBILEGL_GL_API void glTextureRenderbufferEXT(GLuint texture, GLenum target, GLuint renderbuffer);
MOBILEGL_GL_API void glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
MOBILEGL_GL_API void glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
MOBILEGL_GL_API void glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glTextureStorage2DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTextureStorage2DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
MOBILEGL_GL_API void glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
MOBILEGL_GL_API void glTextureStorage3DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTextureStorage3DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
MOBILEGL_GL_API void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
MOBILEGL_GL_API void glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer);
MOBILEGL_GL_API void glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
MOBILEGL_GL_API void glUniform1d(GLint location, GLdouble x);
MOBILEGL_GL_API void glUniform1dv(GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glUniform1f(GLint location, GLfloat v0);
MOBILEGL_GL_API void glUniform1fv(GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glUniform1i(GLint location, GLint v0);
MOBILEGL_GL_API void glUniform1i64ARB(GLint location, GLint64 x);
MOBILEGL_GL_API void glUniform1i64NV(GLint location, GLint64EXT x);
MOBILEGL_GL_API void glUniform1i64vARB(GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glUniform1i64vNV(GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glUniform1iv(GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glUniform1ui(GLint location, GLuint v0);
MOBILEGL_GL_API void glUniform1ui64ARB(GLint location, GLuint64 x);
MOBILEGL_GL_API void glUniform1ui64NV(GLint location, GLuint64EXT x);
MOBILEGL_GL_API void glUniform1ui64vARB(GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glUniform1ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glUniform1uiv(GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glUniform2d(GLint location, GLdouble x, GLdouble y);
MOBILEGL_GL_API void glUniform2dv(GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glUniform2f(GLint location, GLfloat v0, GLfloat v1);
MOBILEGL_GL_API void glUniform2fv(GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glUniform2i(GLint location, GLint v0, GLint v1);
MOBILEGL_GL_API void glUniform2i64ARB(GLint location, GLint64 x, GLint64 y);
MOBILEGL_GL_API void glUniform2i64NV(GLint location, GLint64EXT x, GLint64EXT y);
MOBILEGL_GL_API void glUniform2i64vARB(GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glUniform2i64vNV(GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glUniform2iv(GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glUniform2ui(GLint location, GLuint v0, GLuint v1);
MOBILEGL_GL_API void glUniform2ui64ARB(GLint location, GLuint64 x, GLuint64 y);
MOBILEGL_GL_API void glUniform2ui64NV(GLint location, GLuint64EXT x, GLuint64EXT y);
MOBILEGL_GL_API void glUniform2ui64vARB(GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glUniform2ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glUniform2uiv(GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glUniform3dv(GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
MOBILEGL_GL_API void glUniform3fv(GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
MOBILEGL_GL_API void glUniform3i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z);
MOBILEGL_GL_API void glUniform3i64NV(GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
MOBILEGL_GL_API void glUniform3i64vARB(GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glUniform3i64vNV(GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glUniform3iv(GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
MOBILEGL_GL_API void glUniform3ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
MOBILEGL_GL_API void glUniform3ui64NV(GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
MOBILEGL_GL_API void glUniform3ui64vARB(GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glUniform3ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glUniform3uiv(GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
MOBILEGL_GL_API void glUniform4dv(GLint location, GLsizei count, const GLdouble* value);
MOBILEGL_GL_API void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
MOBILEGL_GL_API void glUniform4fv(GLint location, GLsizei count, const GLfloat* value);
MOBILEGL_GL_API void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
MOBILEGL_GL_API void glUniform4i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
MOBILEGL_GL_API void glUniform4i64NV(GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
MOBILEGL_GL_API void glUniform4i64vARB(GLint location, GLsizei count, const GLint64* value);
MOBILEGL_GL_API void glUniform4i64vNV(GLint location, GLsizei count, const GLint64EXT* value);
MOBILEGL_GL_API void glUniform4iv(GLint location, GLsizei count, const GLint* value);
MOBILEGL_GL_API void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
MOBILEGL_GL_API void glUniform4ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
MOBILEGL_GL_API void glUniform4ui64NV(GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
MOBILEGL_GL_API void glUniform4ui64vARB(GLint location, GLsizei count, const GLuint64* value);
MOBILEGL_GL_API void glUniform4ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value);
MOBILEGL_GL_API void glUniform4uiv(GLint location, GLsizei count, const GLuint* value);
MOBILEGL_GL_API void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
MOBILEGL_GL_API void glUniformHandleui64ARB(GLint location, GLuint64 value);
MOBILEGL_GL_API void glUniformHandleui64NV(GLint location, GLuint64 value);
MOBILEGL_GL_API void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
MOBILEGL_GL_API void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
MOBILEGL_GL_API void glUniformui64NV(GLint location, GLuint64EXT value);
MOBILEGL_GL_API GLboolean glUnmapBuffer(GLenum target);
MOBILEGL_GL_API GLboolean glUnmapNamedBuffer(GLuint buffer);
MOBILEGL_GL_API GLboolean glUnmapNamedBufferEXT(GLuint buffer);
MOBILEGL_GL_API void glUseProgram(GLuint program);
MOBILEGL_GL_API void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
MOBILEGL_GL_API void glUseShaderProgramEXT(GLenum type, GLuint program);
MOBILEGL_GL_API void glValidateProgram(GLuint program);
MOBILEGL_GL_API void glValidateProgramPipeline(GLuint pipeline);
MOBILEGL_GL_API void glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex);
MOBILEGL_GL_API void glVertexArrayAttribFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexArrayAttribIFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexArrayAttribLFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexArrayBindVertexBufferEXT(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
MOBILEGL_GL_API void glVertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor);
MOBILEGL_GL_API void glVertexArrayColorOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayEdgeFlagOffsetEXT(GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayElementBuffer(GLuint vaobj, GLuint buffer);
MOBILEGL_GL_API void glVertexArrayFogCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayIndexOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayMultiTexCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayNormalOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArraySecondaryColorOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayTexCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayVertexAttribBindingEXT(GLuint vaobj, GLuint attribindex, GLuint bindingindex);
MOBILEGL_GL_API void glVertexArrayVertexAttribDivisorEXT(GLuint vaobj, GLuint index, GLuint divisor);
MOBILEGL_GL_API void glVertexArrayVertexAttribFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexArrayVertexAttribIFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexArrayVertexAttribIOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayVertexAttribLFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexArrayVertexAttribLOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayVertexAttribOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexArrayVertexBindingDivisorEXT(GLuint vaobj, GLuint bindingindex, GLuint divisor);
MOBILEGL_GL_API void glVertexArrayVertexBuffer(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
MOBILEGL_GL_API void glVertexArrayVertexOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
MOBILEGL_GL_API void glVertexAttrib1d(GLuint index, GLdouble x);
MOBILEGL_GL_API void glVertexAttrib1f(GLuint index, GLfloat x);
MOBILEGL_GL_API void glVertexAttrib1s(GLuint index, GLshort x);
MOBILEGL_GL_API void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y);
MOBILEGL_GL_API void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
MOBILEGL_GL_API void glVertexAttrib2s(GLuint index, GLshort x, GLshort y);
MOBILEGL_GL_API void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
MOBILEGL_GL_API void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z);
MOBILEGL_GL_API void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
MOBILEGL_GL_API void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
MOBILEGL_GL_API void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
MOBILEGL_GL_API void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
MOBILEGL_GL_API void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
MOBILEGL_GL_API void glVertexAttribDivisor(GLuint index, GLuint divisor);
MOBILEGL_GL_API void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexAttribFormatNV(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
MOBILEGL_GL_API void glVertexAttribI1i(GLuint index, GLint x);
MOBILEGL_GL_API void glVertexAttribI1ui(GLuint index, GLuint x);
MOBILEGL_GL_API void glVertexAttribI2i(GLuint index, GLint x, GLint y);
MOBILEGL_GL_API void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y);
MOBILEGL_GL_API void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z);
MOBILEGL_GL_API void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z);
MOBILEGL_GL_API void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
MOBILEGL_GL_API void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
MOBILEGL_GL_API void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexAttribIFormatNV(GLuint index, GLint size, GLenum type, GLsizei stride);
MOBILEGL_GL_API void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer);
MOBILEGL_GL_API void glVertexAttribL1d(GLuint index, GLdouble x);
MOBILEGL_GL_API void glVertexAttribL1i64NV(GLuint index, GLint64EXT x);
MOBILEGL_GL_API void glVertexAttribL1ui64ARB(GLuint index, GLuint64EXT x);
MOBILEGL_GL_API void glVertexAttribL1ui64NV(GLuint index, GLuint64EXT x);
MOBILEGL_GL_API void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y);
MOBILEGL_GL_API void glVertexAttribL2i64NV(GLuint index, GLint64EXT x, GLint64EXT y);
MOBILEGL_GL_API void glVertexAttribL2ui64NV(GLuint index, GLuint64EXT x, GLuint64EXT y);
MOBILEGL_GL_API void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
MOBILEGL_GL_API void glVertexAttribL3i64NV(GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
MOBILEGL_GL_API void glVertexAttribL3ui64NV(GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
MOBILEGL_GL_API void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
MOBILEGL_GL_API void glVertexAttribL4i64NV(GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
MOBILEGL_GL_API void glVertexAttribL4ui64NV(GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
MOBILEGL_GL_API void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
MOBILEGL_GL_API void glVertexAttribLFormatNV(GLuint index, GLint size, GLenum type, GLsizei stride);
MOBILEGL_GL_API void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer);
MOBILEGL_GL_API void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
MOBILEGL_GL_API void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
MOBILEGL_GL_API void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
MOBILEGL_GL_API void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
MOBILEGL_GL_API void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer);
MOBILEGL_GL_API void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
MOBILEGL_GL_API void glVertexFormatNV(GLint size, GLenum type, GLsizei stride);
MOBILEGL_GL_API void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
MOBILEGL_GL_API void glViewportArrayv(GLuint first, GLsizei count, const GLfloat* v);
MOBILEGL_GL_API void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
MOBILEGL_GL_API void glViewportPositionWScaleNV(GLuint index, GLfloat xcoeff, GLfloat ycoeff);
MOBILEGL_GL_API void glViewportSwizzleNV(GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
MOBILEGL_GL_API void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
MOBILEGL_GL_API void glWaitVkSemaphoreNV(GLuint64 vkSemaphore);
namespace MobileGL::ClientTrampoline::Gen {
// Resolves a GL function name against the exported trampoline table
// (direct &glXxx references - no dlsym, mirroring monolith
// MobileGL::MG_Impl::GetProcAddress semantics).
void* LookupGeneratedProc(const char* name);
}
// End of File
@@ -0,0 +1,37 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BeginOcclusionQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BeginOcclusionQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBeginOcclusionQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BeginOcclusionQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def BeginOcclusionQueryStart(builder):
builder.StartObject(0)
def Start(builder):
BeginOcclusionQueryStart(builder)
def BeginOcclusionQueryEnd(builder):
return builder.EndObject()
def End(builder):
return BeginOcclusionQueryEnd(builder)
@@ -0,0 +1,37 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BeginTimeElapsedQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BeginTimeElapsedQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBeginTimeElapsedQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BeginTimeElapsedQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def BeginTimeElapsedQueryStart(builder):
builder.StartObject(0)
def Start(builder):
BeginTimeElapsedQueryStart(builder)
def BeginTimeElapsedQueryEnd(builder):
return builder.EndObject()
def End(builder):
return BeginTimeElapsedQueryEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BeginTransformFeedback(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BeginTransformFeedback()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBeginTransformFeedback(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BeginTransformFeedback
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BeginTransformFeedback
def PrimitiveMode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def BeginTransformFeedbackStart(builder):
builder.StartObject(1)
def Start(builder):
BeginTransformFeedbackStart(builder)
def BeginTransformFeedbackAddPrimitiveMode(builder, primitiveMode):
builder.PrependUint32Slot(0, primitiveMode, 0)
def AddPrimitiveMode(builder, primitiveMode):
BeginTransformFeedbackAddPrimitiveMode(builder, primitiveMode)
def BeginTransformFeedbackEnd(builder):
return builder.EndObject()
def End(builder):
return BeginTransformFeedbackEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BeginXfbPrimitivesQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BeginXfbPrimitivesQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBeginXfbPrimitivesQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BeginXfbPrimitivesQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BeginXfbPrimitivesQuery
def Generated(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def BeginXfbPrimitivesQueryStart(builder):
builder.StartObject(1)
def Start(builder):
BeginXfbPrimitivesQueryStart(builder)
def BeginXfbPrimitivesQueryAddGenerated(builder, generated):
builder.PrependUint32Slot(0, generated, 0)
def AddGenerated(builder, generated):
BeginXfbPrimitivesQueryAddGenerated(builder, generated)
def BeginXfbPrimitivesQueryEnd(builder):
return builder.EndObject()
def End(builder):
return BeginXfbPrimitivesQueryEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BindTransformFeedback(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BindTransformFeedback()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBindTransformFeedback(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BindTransformFeedback
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BindTransformFeedback
def Name(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def BindTransformFeedbackStart(builder):
builder.StartObject(1)
def Start(builder):
BindTransformFeedbackStart(builder)
def BindTransformFeedbackAddName(builder, name):
builder.PrependUint32Slot(0, name, 0)
def AddName(builder, name):
BindTransformFeedbackAddName(builder, name)
def BindTransformFeedbackEnd(builder):
return builder.EndObject()
def End(builder):
return BindTransformFeedbackEnd(builder)
@@ -0,0 +1,193 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BlitFramebuffer(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BlitFramebuffer()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBlitFramebuffer(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BlitFramebuffer
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BlitFramebuffer
def ReadFramebuffer(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def DrawFramebuffer(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def SrcX0(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def SrcY0(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def SrcX1(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def SrcY1(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def DstX0(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def DstY0(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def DstX1(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def DstY1(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def Mask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# BlitFramebuffer
def Filter(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def BlitFramebufferStart(builder):
builder.StartObject(12)
def Start(builder):
BlitFramebufferStart(builder)
def BlitFramebufferAddReadFramebuffer(builder, readFramebuffer):
builder.PrependUint64Slot(0, readFramebuffer, 0)
def AddReadFramebuffer(builder, readFramebuffer):
BlitFramebufferAddReadFramebuffer(builder, readFramebuffer)
def BlitFramebufferAddDrawFramebuffer(builder, drawFramebuffer):
builder.PrependUint64Slot(1, drawFramebuffer, 0)
def AddDrawFramebuffer(builder, drawFramebuffer):
BlitFramebufferAddDrawFramebuffer(builder, drawFramebuffer)
def BlitFramebufferAddSrcX0(builder, srcX0):
builder.PrependInt32Slot(2, srcX0, 0)
def AddSrcX0(builder, srcX0):
BlitFramebufferAddSrcX0(builder, srcX0)
def BlitFramebufferAddSrcY0(builder, srcY0):
builder.PrependInt32Slot(3, srcY0, 0)
def AddSrcY0(builder, srcY0):
BlitFramebufferAddSrcY0(builder, srcY0)
def BlitFramebufferAddSrcX1(builder, srcX1):
builder.PrependInt32Slot(4, srcX1, 0)
def AddSrcX1(builder, srcX1):
BlitFramebufferAddSrcX1(builder, srcX1)
def BlitFramebufferAddSrcY1(builder, srcY1):
builder.PrependInt32Slot(5, srcY1, 0)
def AddSrcY1(builder, srcY1):
BlitFramebufferAddSrcY1(builder, srcY1)
def BlitFramebufferAddDstX0(builder, dstX0):
builder.PrependInt32Slot(6, dstX0, 0)
def AddDstX0(builder, dstX0):
BlitFramebufferAddDstX0(builder, dstX0)
def BlitFramebufferAddDstY0(builder, dstY0):
builder.PrependInt32Slot(7, dstY0, 0)
def AddDstY0(builder, dstY0):
BlitFramebufferAddDstY0(builder, dstY0)
def BlitFramebufferAddDstX1(builder, dstX1):
builder.PrependInt32Slot(8, dstX1, 0)
def AddDstX1(builder, dstX1):
BlitFramebufferAddDstX1(builder, dstX1)
def BlitFramebufferAddDstY1(builder, dstY1):
builder.PrependInt32Slot(9, dstY1, 0)
def AddDstY1(builder, dstY1):
BlitFramebufferAddDstY1(builder, dstY1)
def BlitFramebufferAddMask(builder, mask):
builder.PrependUint32Slot(10, mask, 0)
def AddMask(builder, mask):
BlitFramebufferAddMask(builder, mask)
def BlitFramebufferAddFilter(builder, filter):
builder.PrependUint32Slot(11, filter, 0)
def AddFilter(builder, filter):
BlitFramebufferAddFilter(builder, filter)
def BlitFramebufferEnd(builder):
return builder.EndObject()
def End(builder):
return BlitFramebufferEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BufferReadbackFromGpu(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BufferReadbackFromGpu()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBufferReadbackFromGpu(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BufferReadbackFromGpu
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BufferReadbackFromGpu
def BufferHandle(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BufferReadbackFromGpu
def Offset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BufferReadbackFromGpu
def Size(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def BufferReadbackFromGpuStart(builder):
builder.StartObject(3)
def Start(builder):
BufferReadbackFromGpuStart(builder)
def BufferReadbackFromGpuAddBufferHandle(builder, bufferHandle):
builder.PrependUint64Slot(0, bufferHandle, 0)
def AddBufferHandle(builder, bufferHandle):
BufferReadbackFromGpuAddBufferHandle(builder, bufferHandle)
def BufferReadbackFromGpuAddOffset(builder, offset):
builder.PrependUint64Slot(1, offset, 0)
def AddOffset(builder, offset):
BufferReadbackFromGpuAddOffset(builder, offset)
def BufferReadbackFromGpuAddSize(builder, size):
builder.PrependUint64Slot(2, size, 0)
def AddSize(builder, size):
BufferReadbackFromGpuAddSize(builder, size)
def BufferReadbackFromGpuEnd(builder):
return builder.EndObject()
def End(builder):
return BufferReadbackFromGpuEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BufferRespecify(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BufferRespecify()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBufferRespecify(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BufferRespecify
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BufferRespecify
def BufferHandle(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BufferRespecify
def Size(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BufferRespecify
def Usage(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def BufferRespecifyStart(builder):
builder.StartObject(3)
def Start(builder):
BufferRespecifyStart(builder)
def BufferRespecifyAddBufferHandle(builder, bufferHandle):
builder.PrependUint64Slot(0, bufferHandle, 0)
def AddBufferHandle(builder, bufferHandle):
BufferRespecifyAddBufferHandle(builder, bufferHandle)
def BufferRespecifyAddSize(builder, size):
builder.PrependUint64Slot(1, size, 0)
def AddSize(builder, size):
BufferRespecifyAddSize(builder, size)
def BufferRespecifyAddUsage(builder, usage):
builder.PrependUint32Slot(2, usage, 0)
def AddUsage(builder, usage):
BufferRespecifyAddUsage(builder, usage)
def BufferRespecifyEnd(builder):
return builder.EndObject()
def End(builder):
return BufferRespecifyEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class BufferSubData(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BufferSubData()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsBufferSubData(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# BufferSubData
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BufferSubData
def BufferHandle(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BufferSubData
def Offset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# BufferSubData
def Size(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def BufferSubDataStart(builder):
builder.StartObject(3)
def Start(builder):
BufferSubDataStart(builder)
def BufferSubDataAddBufferHandle(builder, bufferHandle):
builder.PrependUint64Slot(0, bufferHandle, 0)
def AddBufferHandle(builder, bufferHandle):
BufferSubDataAddBufferHandle(builder, bufferHandle)
def BufferSubDataAddOffset(builder, offset):
builder.PrependUint64Slot(1, offset, 0)
def AddOffset(builder, offset):
BufferSubDataAddOffset(builder, offset)
def BufferSubDataAddSize(builder, size):
builder.PrependUint64Slot(2, size, 0)
def AddSize(builder, size):
BufferSubDataAddSize(builder, size)
def BufferSubDataEnd(builder):
return builder.EndObject()
def End(builder):
return BufferSubDataEnd(builder)
@@ -0,0 +1,89 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class ClearColor(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ClearColor()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsClearColor(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# ClearColor
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# ClearColor
def Red(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# ClearColor
def Green(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# ClearColor
def Blue(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# ClearColor
def Alpha(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
def ClearColorStart(builder):
builder.StartObject(4)
def Start(builder):
ClearColorStart(builder)
def ClearColorAddRed(builder, red):
builder.PrependFloat32Slot(0, red, 0.0)
def AddRed(builder, red):
ClearColorAddRed(builder, red)
def ClearColorAddGreen(builder, green):
builder.PrependFloat32Slot(1, green, 0.0)
def AddGreen(builder, green):
ClearColorAddGreen(builder, green)
def ClearColorAddBlue(builder, blue):
builder.PrependFloat32Slot(2, blue, 0.0)
def AddBlue(builder, blue):
ClearColorAddBlue(builder, blue)
def ClearColorAddAlpha(builder, alpha):
builder.PrependFloat32Slot(3, alpha, 0.0)
def AddAlpha(builder, alpha):
ClearColorAddAlpha(builder, alpha)
def ClearColorEnd(builder):
return builder.EndObject()
def End(builder):
return ClearColorEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class ClientWaitSync(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ClientWaitSync()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsClientWaitSync(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# ClientWaitSync
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# ClientWaitSync
def Sync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# ClientWaitSync
def Flags(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# ClientWaitSync
def Timeout(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def ClientWaitSyncStart(builder):
builder.StartObject(3)
def Start(builder):
ClientWaitSyncStart(builder)
def ClientWaitSyncAddSync(builder, sync):
builder.PrependUint64Slot(0, sync, 0)
def AddSync(builder, sync):
ClientWaitSyncAddSync(builder, sync)
def ClientWaitSyncAddFlags(builder, flags):
builder.PrependUint32Slot(1, flags, 0)
def AddFlags(builder, flags):
ClientWaitSyncAddFlags(builder, flags)
def ClientWaitSyncAddTimeout(builder, timeout):
builder.PrependUint64Slot(2, timeout, 0)
def AddTimeout(builder, timeout):
ClientWaitSyncAddTimeout(builder, timeout)
def ClientWaitSyncEnd(builder):
return builder.EndObject()
def End(builder):
return ClientWaitSyncEnd(builder)
@@ -0,0 +1,875 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Command(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Command()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsCommand(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# Command
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# Command
def Opcode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# Command
def SessionId(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# Command
def Token(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# Command
def Clear(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.GlClear import GlClear
obj = GlClear()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def ClearColor(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.ClearColor import ClearColor
obj = ClearColor()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawArrays(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawArrays import DrawArrays
obj = DrawArrays()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawElements(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawElements import DrawElements
obj = DrawElements()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BufferSubData(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BufferSubData import BufferSubData
obj = BufferSubData()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def MemoryBarrier(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.MemoryBarrier import MemoryBarrier
obj = MemoryBarrier()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def MemoryBarrierByRegion(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.MemoryBarrierByRegion import MemoryBarrierByRegion
obj = MemoryBarrierByRegion()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def PatchParameteri(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.PatchParameteri import PatchParameteri
obj = PatchParameteri()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def GenerateMipmap(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.GenerateMipmap import GenerateMipmap
obj = GenerateMipmap()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DispatchCompute(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DispatchCompute import DispatchCompute
obj = DispatchCompute()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BeginTransformFeedback(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BeginTransformFeedback import BeginTransformFeedback
obj = BeginTransformFeedback()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BindTransformFeedback(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BindTransformFeedback import BindTransformFeedback
obj = BindTransformFeedback()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BlitFramebuffer(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BlitFramebuffer import BlitFramebuffer
obj = BlitFramebuffer()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def SwapBuffers(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(36))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.SwapBuffers import SwapBuffers
obj = SwapBuffers()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def Data(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(38))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DataBlob import DataBlob
obj = DataBlob()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DispatchComputeIndirect(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(40))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DispatchComputeIndirect import DispatchComputeIndirect
obj = DispatchComputeIndirect()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def FenceSync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(42))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.FenceSync import FenceSync
obj = FenceSync()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DeleteSync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(44))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DeleteSync import DeleteSync
obj = DeleteSync()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def WaitSync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(46))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.WaitSync import WaitSync
obj = WaitSync()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawArraysInstanced(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(48))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawArraysInstanced import DrawArraysInstanced
obj = DrawArraysInstanced()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawElementsInstanced(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(50))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawElementsInstanced import DrawElementsInstanced
obj = DrawElementsInstanced()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawRangeElements(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(52))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawRangeElements import DrawRangeElements
obj = DrawRangeElements()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BufferRespecify(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(54))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BufferRespecify import BufferRespecify
obj = BufferRespecify()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawArraysIndirect(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(56))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawArraysIndirect import DrawArraysIndirect
obj = DrawArraysIndirect()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DrawElementsIndirect(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(58))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DrawElementsIndirect import DrawElementsIndirect
obj = DrawElementsIndirect()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def GetString(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(60))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.GetString import GetString
obj = GetString()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def TextureRespecify(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(62))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.TextureRespecify import TextureRespecify
obj = TextureRespecify()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def TextureSubImage(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(64))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.TextureSubImage import TextureSubImage
obj = TextureSubImage()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def ReadPixels(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(66))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.ReadPixels import ReadPixels
obj = ReadPixels()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BufferReadbackFromGpu(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(68))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BufferReadbackFromGpu import BufferReadbackFromGpu
obj = BufferReadbackFromGpu()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def MapBufferRange(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(70))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.MapBufferRange import MapBufferRange
obj = MapBufferRange()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def UnmapBuffer(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(72))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.UnmapBuffer import UnmapBuffer
obj = UnmapBuffer()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EglCreatePbufferSurface(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(74))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EglCreatePbufferSurface import EglCreatePbufferSurface
obj = EglCreatePbufferSurface()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EglDestroySurface(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(76))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EglDestroySurface import EglDestroySurface
obj = EglDestroySurface()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EglMakeCurrent(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(78))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EglMakeCurrent import EglMakeCurrent
obj = EglMakeCurrent()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EglSwapInterval(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(80))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EglSwapInterval import EglSwapInterval
obj = EglSwapInterval()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EglResizeSurface(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(82))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EglResizeSurface import EglResizeSurface
obj = EglResizeSurface()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def ClientWaitSync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(84))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.ClientWaitSync import ClientWaitSync
obj = ClientWaitSync()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BeginTimeElapsedQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(86))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BeginTimeElapsedQuery import BeginTimeElapsedQuery
obj = BeginTimeElapsedQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EndTimeElapsedQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(88))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EndTimeElapsedQuery import EndTimeElapsedQuery
obj = EndTimeElapsedQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def DeleteBackendQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(90))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.DeleteBackendQuery import DeleteBackendQuery
obj = DeleteBackendQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def IsQueryResultAvailable(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(92))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.IsQueryResultAvailable import IsQueryResultAvailable
obj = IsQueryResultAvailable()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def GetQueryResult64(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(94))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.GetQueryResult64 import GetQueryResult64
obj = GetQueryResult64()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BeginOcclusionQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(96))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BeginOcclusionQuery import BeginOcclusionQuery
obj = BeginOcclusionQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EndOcclusionQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(98))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EndOcclusionQuery import EndOcclusionQuery
obj = EndOcclusionQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def BeginXfbPrimitivesQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(100))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.BeginXfbPrimitivesQuery import BeginXfbPrimitivesQuery
obj = BeginXfbPrimitivesQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Command
def EndXfbPrimitivesQuery(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(102))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.EndXfbPrimitivesQuery import EndXfbPrimitivesQuery
obj = EndXfbPrimitivesQuery()
obj.Init(self._tab.Bytes, x)
return obj
return None
def CommandStart(builder):
builder.StartObject(50)
def Start(builder):
CommandStart(builder)
def CommandAddOpcode(builder, opcode):
builder.PrependUint32Slot(0, opcode, 0)
def AddOpcode(builder, opcode):
CommandAddOpcode(builder, opcode)
def CommandAddSessionId(builder, sessionId):
builder.PrependUint64Slot(1, sessionId, 0)
def AddSessionId(builder, sessionId):
CommandAddSessionId(builder, sessionId)
def CommandAddToken(builder, token):
builder.PrependUint64Slot(2, token, 0)
def AddToken(builder, token):
CommandAddToken(builder, token)
def CommandAddClear(builder, clear):
builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(clear), 0)
def AddClear(builder, clear):
CommandAddClear(builder, clear)
def CommandAddClearColor(builder, clearColor):
builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(clearColor), 0)
def AddClearColor(builder, clearColor):
CommandAddClearColor(builder, clearColor)
def CommandAddDrawArrays(builder, drawArrays):
builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(drawArrays), 0)
def AddDrawArrays(builder, drawArrays):
CommandAddDrawArrays(builder, drawArrays)
def CommandAddDrawElements(builder, drawElements):
builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(drawElements), 0)
def AddDrawElements(builder, drawElements):
CommandAddDrawElements(builder, drawElements)
def CommandAddBufferSubData(builder, bufferSubData):
builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(bufferSubData), 0)
def AddBufferSubData(builder, bufferSubData):
CommandAddBufferSubData(builder, bufferSubData)
def CommandAddMemoryBarrier(builder, memoryBarrier):
builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(memoryBarrier), 0)
def AddMemoryBarrier(builder, memoryBarrier):
CommandAddMemoryBarrier(builder, memoryBarrier)
def CommandAddMemoryBarrierByRegion(builder, memoryBarrierByRegion):
builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(memoryBarrierByRegion), 0)
def AddMemoryBarrierByRegion(builder, memoryBarrierByRegion):
CommandAddMemoryBarrierByRegion(builder, memoryBarrierByRegion)
def CommandAddPatchParameteri(builder, patchParameteri):
builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(patchParameteri), 0)
def AddPatchParameteri(builder, patchParameteri):
CommandAddPatchParameteri(builder, patchParameteri)
def CommandAddGenerateMipmap(builder, generateMipmap):
builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(generateMipmap), 0)
def AddGenerateMipmap(builder, generateMipmap):
CommandAddGenerateMipmap(builder, generateMipmap)
def CommandAddDispatchCompute(builder, dispatchCompute):
builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(dispatchCompute), 0)
def AddDispatchCompute(builder, dispatchCompute):
CommandAddDispatchCompute(builder, dispatchCompute)
def CommandAddBeginTransformFeedback(builder, beginTransformFeedback):
builder.PrependUOffsetTRelativeSlot(13, flatbuffers.number_types.UOffsetTFlags.py_type(beginTransformFeedback), 0)
def AddBeginTransformFeedback(builder, beginTransformFeedback):
CommandAddBeginTransformFeedback(builder, beginTransformFeedback)
def CommandAddBindTransformFeedback(builder, bindTransformFeedback):
builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(bindTransformFeedback), 0)
def AddBindTransformFeedback(builder, bindTransformFeedback):
CommandAddBindTransformFeedback(builder, bindTransformFeedback)
def CommandAddBlitFramebuffer(builder, blitFramebuffer):
builder.PrependUOffsetTRelativeSlot(15, flatbuffers.number_types.UOffsetTFlags.py_type(blitFramebuffer), 0)
def AddBlitFramebuffer(builder, blitFramebuffer):
CommandAddBlitFramebuffer(builder, blitFramebuffer)
def CommandAddSwapBuffers(builder, swapBuffers):
builder.PrependUOffsetTRelativeSlot(16, flatbuffers.number_types.UOffsetTFlags.py_type(swapBuffers), 0)
def AddSwapBuffers(builder, swapBuffers):
CommandAddSwapBuffers(builder, swapBuffers)
def CommandAddData(builder, data):
builder.PrependUOffsetTRelativeSlot(17, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
def AddData(builder, data):
CommandAddData(builder, data)
def CommandAddDispatchComputeIndirect(builder, dispatchComputeIndirect):
builder.PrependUOffsetTRelativeSlot(18, flatbuffers.number_types.UOffsetTFlags.py_type(dispatchComputeIndirect), 0)
def AddDispatchComputeIndirect(builder, dispatchComputeIndirect):
CommandAddDispatchComputeIndirect(builder, dispatchComputeIndirect)
def CommandAddFenceSync(builder, fenceSync):
builder.PrependUOffsetTRelativeSlot(19, flatbuffers.number_types.UOffsetTFlags.py_type(fenceSync), 0)
def AddFenceSync(builder, fenceSync):
CommandAddFenceSync(builder, fenceSync)
def CommandAddDeleteSync(builder, deleteSync):
builder.PrependUOffsetTRelativeSlot(20, flatbuffers.number_types.UOffsetTFlags.py_type(deleteSync), 0)
def AddDeleteSync(builder, deleteSync):
CommandAddDeleteSync(builder, deleteSync)
def CommandAddWaitSync(builder, waitSync):
builder.PrependUOffsetTRelativeSlot(21, flatbuffers.number_types.UOffsetTFlags.py_type(waitSync), 0)
def AddWaitSync(builder, waitSync):
CommandAddWaitSync(builder, waitSync)
def CommandAddDrawArraysInstanced(builder, drawArraysInstanced):
builder.PrependUOffsetTRelativeSlot(22, flatbuffers.number_types.UOffsetTFlags.py_type(drawArraysInstanced), 0)
def AddDrawArraysInstanced(builder, drawArraysInstanced):
CommandAddDrawArraysInstanced(builder, drawArraysInstanced)
def CommandAddDrawElementsInstanced(builder, drawElementsInstanced):
builder.PrependUOffsetTRelativeSlot(23, flatbuffers.number_types.UOffsetTFlags.py_type(drawElementsInstanced), 0)
def AddDrawElementsInstanced(builder, drawElementsInstanced):
CommandAddDrawElementsInstanced(builder, drawElementsInstanced)
def CommandAddDrawRangeElements(builder, drawRangeElements):
builder.PrependUOffsetTRelativeSlot(24, flatbuffers.number_types.UOffsetTFlags.py_type(drawRangeElements), 0)
def AddDrawRangeElements(builder, drawRangeElements):
CommandAddDrawRangeElements(builder, drawRangeElements)
def CommandAddBufferRespecify(builder, bufferRespecify):
builder.PrependUOffsetTRelativeSlot(25, flatbuffers.number_types.UOffsetTFlags.py_type(bufferRespecify), 0)
def AddBufferRespecify(builder, bufferRespecify):
CommandAddBufferRespecify(builder, bufferRespecify)
def CommandAddDrawArraysIndirect(builder, drawArraysIndirect):
builder.PrependUOffsetTRelativeSlot(26, flatbuffers.number_types.UOffsetTFlags.py_type(drawArraysIndirect), 0)
def AddDrawArraysIndirect(builder, drawArraysIndirect):
CommandAddDrawArraysIndirect(builder, drawArraysIndirect)
def CommandAddDrawElementsIndirect(builder, drawElementsIndirect):
builder.PrependUOffsetTRelativeSlot(27, flatbuffers.number_types.UOffsetTFlags.py_type(drawElementsIndirect), 0)
def AddDrawElementsIndirect(builder, drawElementsIndirect):
CommandAddDrawElementsIndirect(builder, drawElementsIndirect)
def CommandAddGetString(builder, getString):
builder.PrependUOffsetTRelativeSlot(28, flatbuffers.number_types.UOffsetTFlags.py_type(getString), 0)
def AddGetString(builder, getString):
CommandAddGetString(builder, getString)
def CommandAddTextureRespecify(builder, textureRespecify):
builder.PrependUOffsetTRelativeSlot(29, flatbuffers.number_types.UOffsetTFlags.py_type(textureRespecify), 0)
def AddTextureRespecify(builder, textureRespecify):
CommandAddTextureRespecify(builder, textureRespecify)
def CommandAddTextureSubImage(builder, textureSubImage):
builder.PrependUOffsetTRelativeSlot(30, flatbuffers.number_types.UOffsetTFlags.py_type(textureSubImage), 0)
def AddTextureSubImage(builder, textureSubImage):
CommandAddTextureSubImage(builder, textureSubImage)
def CommandAddReadPixels(builder, readPixels):
builder.PrependUOffsetTRelativeSlot(31, flatbuffers.number_types.UOffsetTFlags.py_type(readPixels), 0)
def AddReadPixels(builder, readPixels):
CommandAddReadPixels(builder, readPixels)
def CommandAddBufferReadbackFromGpu(builder, bufferReadbackFromGpu):
builder.PrependUOffsetTRelativeSlot(32, flatbuffers.number_types.UOffsetTFlags.py_type(bufferReadbackFromGpu), 0)
def AddBufferReadbackFromGpu(builder, bufferReadbackFromGpu):
CommandAddBufferReadbackFromGpu(builder, bufferReadbackFromGpu)
def CommandAddMapBufferRange(builder, mapBufferRange):
builder.PrependUOffsetTRelativeSlot(33, flatbuffers.number_types.UOffsetTFlags.py_type(mapBufferRange), 0)
def AddMapBufferRange(builder, mapBufferRange):
CommandAddMapBufferRange(builder, mapBufferRange)
def CommandAddUnmapBuffer(builder, unmapBuffer):
builder.PrependUOffsetTRelativeSlot(34, flatbuffers.number_types.UOffsetTFlags.py_type(unmapBuffer), 0)
def AddUnmapBuffer(builder, unmapBuffer):
CommandAddUnmapBuffer(builder, unmapBuffer)
def CommandAddEglCreatePbufferSurface(builder, eglCreatePbufferSurface):
builder.PrependUOffsetTRelativeSlot(35, flatbuffers.number_types.UOffsetTFlags.py_type(eglCreatePbufferSurface), 0)
def AddEglCreatePbufferSurface(builder, eglCreatePbufferSurface):
CommandAddEglCreatePbufferSurface(builder, eglCreatePbufferSurface)
def CommandAddEglDestroySurface(builder, eglDestroySurface):
builder.PrependUOffsetTRelativeSlot(36, flatbuffers.number_types.UOffsetTFlags.py_type(eglDestroySurface), 0)
def AddEglDestroySurface(builder, eglDestroySurface):
CommandAddEglDestroySurface(builder, eglDestroySurface)
def CommandAddEglMakeCurrent(builder, eglMakeCurrent):
builder.PrependUOffsetTRelativeSlot(37, flatbuffers.number_types.UOffsetTFlags.py_type(eglMakeCurrent), 0)
def AddEglMakeCurrent(builder, eglMakeCurrent):
CommandAddEglMakeCurrent(builder, eglMakeCurrent)
def CommandAddEglSwapInterval(builder, eglSwapInterval):
builder.PrependUOffsetTRelativeSlot(38, flatbuffers.number_types.UOffsetTFlags.py_type(eglSwapInterval), 0)
def AddEglSwapInterval(builder, eglSwapInterval):
CommandAddEglSwapInterval(builder, eglSwapInterval)
def CommandAddEglResizeSurface(builder, eglResizeSurface):
builder.PrependUOffsetTRelativeSlot(39, flatbuffers.number_types.UOffsetTFlags.py_type(eglResizeSurface), 0)
def AddEglResizeSurface(builder, eglResizeSurface):
CommandAddEglResizeSurface(builder, eglResizeSurface)
def CommandAddClientWaitSync(builder, clientWaitSync):
builder.PrependUOffsetTRelativeSlot(40, flatbuffers.number_types.UOffsetTFlags.py_type(clientWaitSync), 0)
def AddClientWaitSync(builder, clientWaitSync):
CommandAddClientWaitSync(builder, clientWaitSync)
def CommandAddBeginTimeElapsedQuery(builder, beginTimeElapsedQuery):
builder.PrependUOffsetTRelativeSlot(41, flatbuffers.number_types.UOffsetTFlags.py_type(beginTimeElapsedQuery), 0)
def AddBeginTimeElapsedQuery(builder, beginTimeElapsedQuery):
CommandAddBeginTimeElapsedQuery(builder, beginTimeElapsedQuery)
def CommandAddEndTimeElapsedQuery(builder, endTimeElapsedQuery):
builder.PrependUOffsetTRelativeSlot(42, flatbuffers.number_types.UOffsetTFlags.py_type(endTimeElapsedQuery), 0)
def AddEndTimeElapsedQuery(builder, endTimeElapsedQuery):
CommandAddEndTimeElapsedQuery(builder, endTimeElapsedQuery)
def CommandAddDeleteBackendQuery(builder, deleteBackendQuery):
builder.PrependUOffsetTRelativeSlot(43, flatbuffers.number_types.UOffsetTFlags.py_type(deleteBackendQuery), 0)
def AddDeleteBackendQuery(builder, deleteBackendQuery):
CommandAddDeleteBackendQuery(builder, deleteBackendQuery)
def CommandAddIsQueryResultAvailable(builder, isQueryResultAvailable):
builder.PrependUOffsetTRelativeSlot(44, flatbuffers.number_types.UOffsetTFlags.py_type(isQueryResultAvailable), 0)
def AddIsQueryResultAvailable(builder, isQueryResultAvailable):
CommandAddIsQueryResultAvailable(builder, isQueryResultAvailable)
def CommandAddGetQueryResult64(builder, getQueryResult64):
builder.PrependUOffsetTRelativeSlot(45, flatbuffers.number_types.UOffsetTFlags.py_type(getQueryResult64), 0)
def AddGetQueryResult64(builder, getQueryResult64):
CommandAddGetQueryResult64(builder, getQueryResult64)
def CommandAddBeginOcclusionQuery(builder, beginOcclusionQuery):
builder.PrependUOffsetTRelativeSlot(46, flatbuffers.number_types.UOffsetTFlags.py_type(beginOcclusionQuery), 0)
def AddBeginOcclusionQuery(builder, beginOcclusionQuery):
CommandAddBeginOcclusionQuery(builder, beginOcclusionQuery)
def CommandAddEndOcclusionQuery(builder, endOcclusionQuery):
builder.PrependUOffsetTRelativeSlot(47, flatbuffers.number_types.UOffsetTFlags.py_type(endOcclusionQuery), 0)
def AddEndOcclusionQuery(builder, endOcclusionQuery):
CommandAddEndOcclusionQuery(builder, endOcclusionQuery)
def CommandAddBeginXfbPrimitivesQuery(builder, beginXfbPrimitivesQuery):
builder.PrependUOffsetTRelativeSlot(48, flatbuffers.number_types.UOffsetTFlags.py_type(beginXfbPrimitivesQuery), 0)
def AddBeginXfbPrimitivesQuery(builder, beginXfbPrimitivesQuery):
CommandAddBeginXfbPrimitivesQuery(builder, beginXfbPrimitivesQuery)
def CommandAddEndXfbPrimitivesQuery(builder, endXfbPrimitivesQuery):
builder.PrependUOffsetTRelativeSlot(49, flatbuffers.number_types.UOffsetTFlags.py_type(endXfbPrimitivesQuery), 0)
def AddEndXfbPrimitivesQuery(builder, endXfbPrimitivesQuery):
CommandAddEndXfbPrimitivesQuery(builder, endXfbPrimitivesQuery)
def CommandEnd(builder):
return builder.EndObject()
def End(builder):
return CommandEnd(builder)
@@ -0,0 +1,63 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DataBlob(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DataBlob()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDataBlob(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DataBlob
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DataBlob
def Offset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# DataBlob
def Size(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DataBlobStart(builder):
builder.StartObject(2)
def Start(builder):
DataBlobStart(builder)
def DataBlobAddOffset(builder, offset):
builder.PrependUint64Slot(0, offset, 0)
def AddOffset(builder, offset):
DataBlobAddOffset(builder, offset)
def DataBlobAddSize(builder, size):
builder.PrependUint64Slot(1, size, 0)
def AddSize(builder, size):
DataBlobAddSize(builder, size)
def DataBlobEnd(builder):
return builder.EndObject()
def End(builder):
return DataBlobEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DeleteBackendQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DeleteBackendQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDeleteBackendQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DeleteBackendQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DeleteBackendQuery
def Query(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DeleteBackendQueryStart(builder):
builder.StartObject(1)
def Start(builder):
DeleteBackendQueryStart(builder)
def DeleteBackendQueryAddQuery(builder, query):
builder.PrependUint64Slot(0, query, 0)
def AddQuery(builder, query):
DeleteBackendQueryAddQuery(builder, query)
def DeleteBackendQueryEnd(builder):
return builder.EndObject()
def End(builder):
return DeleteBackendQueryEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DeleteSync(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DeleteSync()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDeleteSync(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DeleteSync
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DeleteSync
def Sync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DeleteSyncStart(builder):
builder.StartObject(1)
def Start(builder):
DeleteSyncStart(builder)
def DeleteSyncAddSync(builder, sync):
builder.PrependUint64Slot(0, sync, 0)
def AddSync(builder, sync):
DeleteSyncAddSync(builder, sync)
def DeleteSyncEnd(builder):
return builder.EndObject()
def End(builder):
return DeleteSyncEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DispatchCompute(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DispatchCompute()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDispatchCompute(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DispatchCompute
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DispatchCompute
def NumGroupsX(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DispatchCompute
def NumGroupsY(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DispatchCompute
def NumGroupsZ(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def DispatchComputeStart(builder):
builder.StartObject(3)
def Start(builder):
DispatchComputeStart(builder)
def DispatchComputeAddNumGroupsX(builder, numGroupsX):
builder.PrependUint32Slot(0, numGroupsX, 0)
def AddNumGroupsX(builder, numGroupsX):
DispatchComputeAddNumGroupsX(builder, numGroupsX)
def DispatchComputeAddNumGroupsY(builder, numGroupsY):
builder.PrependUint32Slot(1, numGroupsY, 0)
def AddNumGroupsY(builder, numGroupsY):
DispatchComputeAddNumGroupsY(builder, numGroupsY)
def DispatchComputeAddNumGroupsZ(builder, numGroupsZ):
builder.PrependUint32Slot(2, numGroupsZ, 0)
def AddNumGroupsZ(builder, numGroupsZ):
DispatchComputeAddNumGroupsZ(builder, numGroupsZ)
def DispatchComputeEnd(builder):
return builder.EndObject()
def End(builder):
return DispatchComputeEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DispatchComputeIndirect(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DispatchComputeIndirect()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDispatchComputeIndirect(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DispatchComputeIndirect
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DispatchComputeIndirect
def IndirectOffset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DispatchComputeIndirectStart(builder):
builder.StartObject(1)
def Start(builder):
DispatchComputeIndirectStart(builder)
def DispatchComputeIndirectAddIndirectOffset(builder, indirectOffset):
builder.PrependUint64Slot(0, indirectOffset, 0)
def AddIndirectOffset(builder, indirectOffset):
DispatchComputeIndirectAddIndirectOffset(builder, indirectOffset)
def DispatchComputeIndirectEnd(builder):
return builder.EndObject()
def End(builder):
return DispatchComputeIndirectEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawArrays(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawArrays()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawArrays(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawArrays
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawArrays
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawArrays
def First(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# DrawArrays
def Count(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def DrawArraysStart(builder):
builder.StartObject(3)
def Start(builder):
DrawArraysStart(builder)
def DrawArraysAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawArraysAddMode(builder, mode)
def DrawArraysAddFirst(builder, first):
builder.PrependInt32Slot(1, first, 0)
def AddFirst(builder, first):
DrawArraysAddFirst(builder, first)
def DrawArraysAddCount(builder, count):
builder.PrependInt32Slot(2, count, 0)
def AddCount(builder, count):
DrawArraysAddCount(builder, count)
def DrawArraysEnd(builder):
return builder.EndObject()
def End(builder):
return DrawArraysEnd(builder)
@@ -0,0 +1,63 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawArraysIndirect(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawArraysIndirect()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawArraysIndirect(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawArraysIndirect
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawArraysIndirect
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawArraysIndirect
def ShmOffset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DrawArraysIndirectStart(builder):
builder.StartObject(2)
def Start(builder):
DrawArraysIndirectStart(builder)
def DrawArraysIndirectAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawArraysIndirectAddMode(builder, mode)
def DrawArraysIndirectAddShmOffset(builder, shmOffset):
builder.PrependUint64Slot(1, shmOffset, 0)
def AddShmOffset(builder, shmOffset):
DrawArraysIndirectAddShmOffset(builder, shmOffset)
def DrawArraysIndirectEnd(builder):
return builder.EndObject()
def End(builder):
return DrawArraysIndirectEnd(builder)
@@ -0,0 +1,89 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawArraysInstanced(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawArraysInstanced()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawArraysInstanced(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawArraysInstanced
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawArraysInstanced
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawArraysInstanced
def First(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# DrawArraysInstanced
def Count(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# DrawArraysInstanced
def Primcount(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def DrawArraysInstancedStart(builder):
builder.StartObject(4)
def Start(builder):
DrawArraysInstancedStart(builder)
def DrawArraysInstancedAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawArraysInstancedAddMode(builder, mode)
def DrawArraysInstancedAddFirst(builder, first):
builder.PrependInt32Slot(1, first, 0)
def AddFirst(builder, first):
DrawArraysInstancedAddFirst(builder, first)
def DrawArraysInstancedAddCount(builder, count):
builder.PrependInt32Slot(2, count, 0)
def AddCount(builder, count):
DrawArraysInstancedAddCount(builder, count)
def DrawArraysInstancedAddPrimcount(builder, primcount):
builder.PrependInt32Slot(3, primcount, 0)
def AddPrimcount(builder, primcount):
DrawArraysInstancedAddPrimcount(builder, primcount)
def DrawArraysInstancedEnd(builder):
return builder.EndObject()
def End(builder):
return DrawArraysInstancedEnd(builder)
@@ -0,0 +1,89 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawElements(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawElements()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawElements(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawElements
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawElements
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawElements
def Count(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# DrawElements
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawElements
def IndicesOffset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DrawElementsStart(builder):
builder.StartObject(4)
def Start(builder):
DrawElementsStart(builder)
def DrawElementsAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawElementsAddMode(builder, mode)
def DrawElementsAddCount(builder, count):
builder.PrependInt32Slot(1, count, 0)
def AddCount(builder, count):
DrawElementsAddCount(builder, count)
def DrawElementsAddType(builder, type):
builder.PrependUint32Slot(2, type, 0)
def AddType(builder, type):
DrawElementsAddType(builder, type)
def DrawElementsAddIndicesOffset(builder, indicesOffset):
builder.PrependUint64Slot(3, indicesOffset, 0)
def AddIndicesOffset(builder, indicesOffset):
DrawElementsAddIndicesOffset(builder, indicesOffset)
def DrawElementsEnd(builder):
return builder.EndObject()
def End(builder):
return DrawElementsEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawElementsIndirect(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawElementsIndirect()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawElementsIndirect(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawElementsIndirect
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawElementsIndirect
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawElementsIndirect
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawElementsIndirect
def ShmOffset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DrawElementsIndirectStart(builder):
builder.StartObject(3)
def Start(builder):
DrawElementsIndirectStart(builder)
def DrawElementsIndirectAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawElementsIndirectAddMode(builder, mode)
def DrawElementsIndirectAddType(builder, type):
builder.PrependUint32Slot(1, type, 0)
def AddType(builder, type):
DrawElementsIndirectAddType(builder, type)
def DrawElementsIndirectAddShmOffset(builder, shmOffset):
builder.PrependUint64Slot(2, shmOffset, 0)
def AddShmOffset(builder, shmOffset):
DrawElementsIndirectAddShmOffset(builder, shmOffset)
def DrawElementsIndirectEnd(builder):
return builder.EndObject()
def End(builder):
return DrawElementsIndirectEnd(builder)
@@ -0,0 +1,102 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawElementsInstanced(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawElementsInstanced()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawElementsInstanced(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawElementsInstanced
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawElementsInstanced
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawElementsInstanced
def Count(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# DrawElementsInstanced
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawElementsInstanced
def IndicesOffset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# DrawElementsInstanced
def InstanceCount(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def DrawElementsInstancedStart(builder):
builder.StartObject(5)
def Start(builder):
DrawElementsInstancedStart(builder)
def DrawElementsInstancedAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawElementsInstancedAddMode(builder, mode)
def DrawElementsInstancedAddCount(builder, count):
builder.PrependInt32Slot(1, count, 0)
def AddCount(builder, count):
DrawElementsInstancedAddCount(builder, count)
def DrawElementsInstancedAddType(builder, type):
builder.PrependUint32Slot(2, type, 0)
def AddType(builder, type):
DrawElementsInstancedAddType(builder, type)
def DrawElementsInstancedAddIndicesOffset(builder, indicesOffset):
builder.PrependUint64Slot(3, indicesOffset, 0)
def AddIndicesOffset(builder, indicesOffset):
DrawElementsInstancedAddIndicesOffset(builder, indicesOffset)
def DrawElementsInstancedAddInstanceCount(builder, instanceCount):
builder.PrependInt32Slot(4, instanceCount, 0)
def AddInstanceCount(builder, instanceCount):
DrawElementsInstancedAddInstanceCount(builder, instanceCount)
def DrawElementsInstancedEnd(builder):
return builder.EndObject()
def End(builder):
return DrawElementsInstancedEnd(builder)
@@ -0,0 +1,115 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DrawRangeElements(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DrawRangeElements()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsDrawRangeElements(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# DrawRangeElements
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# DrawRangeElements
def Mode(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawRangeElements
def Start(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawRangeElements
def End(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawRangeElements
def Count(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# DrawRangeElements
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# DrawRangeElements
def IndicesOffset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def DrawRangeElementsStart(builder):
builder.StartObject(6)
def Start(builder):
DrawRangeElementsStart(builder)
def DrawRangeElementsAddMode(builder, mode):
builder.PrependUint32Slot(0, mode, 0)
def AddMode(builder, mode):
DrawRangeElementsAddMode(builder, mode)
def DrawRangeElementsAddStart(builder, start):
builder.PrependUint32Slot(1, start, 0)
def AddStart(builder, start):
DrawRangeElementsAddStart(builder, start)
def DrawRangeElementsAddEnd(builder, end):
builder.PrependUint32Slot(2, end, 0)
def AddEnd(builder, end):
DrawRangeElementsAddEnd(builder, end)
def DrawRangeElementsAddCount(builder, count):
builder.PrependInt32Slot(3, count, 0)
def AddCount(builder, count):
DrawRangeElementsAddCount(builder, count)
def DrawRangeElementsAddType(builder, type):
builder.PrependUint32Slot(4, type, 0)
def AddType(builder, type):
DrawRangeElementsAddType(builder, type)
def DrawRangeElementsAddIndicesOffset(builder, indicesOffset):
builder.PrependUint64Slot(5, indicesOffset, 0)
def AddIndicesOffset(builder, indicesOffset):
DrawRangeElementsAddIndicesOffset(builder, indicesOffset)
def DrawRangeElementsEnd(builder):
return builder.EndObject()
def End(builder):
return DrawRangeElementsEnd(builder)
@@ -0,0 +1,89 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EglCreatePbufferSurface(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EglCreatePbufferSurface()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEglCreatePbufferSurface(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EglCreatePbufferSurface
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EglCreatePbufferSurface
def Display(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglCreatePbufferSurface
def Surface(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglCreatePbufferSurface
def Width(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# EglCreatePbufferSurface
def Height(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def EglCreatePbufferSurfaceStart(builder):
builder.StartObject(4)
def Start(builder):
EglCreatePbufferSurfaceStart(builder)
def EglCreatePbufferSurfaceAddDisplay(builder, display):
builder.PrependUint64Slot(0, display, 0)
def AddDisplay(builder, display):
EglCreatePbufferSurfaceAddDisplay(builder, display)
def EglCreatePbufferSurfaceAddSurface(builder, surface):
builder.PrependUint64Slot(1, surface, 0)
def AddSurface(builder, surface):
EglCreatePbufferSurfaceAddSurface(builder, surface)
def EglCreatePbufferSurfaceAddWidth(builder, width):
builder.PrependInt32Slot(2, width, 0)
def AddWidth(builder, width):
EglCreatePbufferSurfaceAddWidth(builder, width)
def EglCreatePbufferSurfaceAddHeight(builder, height):
builder.PrependInt32Slot(3, height, 0)
def AddHeight(builder, height):
EglCreatePbufferSurfaceAddHeight(builder, height)
def EglCreatePbufferSurfaceEnd(builder):
return builder.EndObject()
def End(builder):
return EglCreatePbufferSurfaceEnd(builder)
@@ -0,0 +1,63 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EglDestroySurface(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EglDestroySurface()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEglDestroySurface(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EglDestroySurface
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EglDestroySurface
def Display(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglDestroySurface
def Surface(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def EglDestroySurfaceStart(builder):
builder.StartObject(2)
def Start(builder):
EglDestroySurfaceStart(builder)
def EglDestroySurfaceAddDisplay(builder, display):
builder.PrependUint64Slot(0, display, 0)
def AddDisplay(builder, display):
EglDestroySurfaceAddDisplay(builder, display)
def EglDestroySurfaceAddSurface(builder, surface):
builder.PrependUint64Slot(1, surface, 0)
def AddSurface(builder, surface):
EglDestroySurfaceAddSurface(builder, surface)
def EglDestroySurfaceEnd(builder):
return builder.EndObject()
def End(builder):
return EglDestroySurfaceEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EglMakeCurrent(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EglMakeCurrent()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEglMakeCurrent(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EglMakeCurrent
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EglMakeCurrent
def Session(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglMakeCurrent
def Draw(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglMakeCurrent
def Read(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def EglMakeCurrentStart(builder):
builder.StartObject(3)
def Start(builder):
EglMakeCurrentStart(builder)
def EglMakeCurrentAddSession(builder, session):
builder.PrependUint64Slot(0, session, 0)
def AddSession(builder, session):
EglMakeCurrentAddSession(builder, session)
def EglMakeCurrentAddDraw(builder, draw):
builder.PrependUint64Slot(1, draw, 0)
def AddDraw(builder, draw):
EglMakeCurrentAddDraw(builder, draw)
def EglMakeCurrentAddRead(builder, read):
builder.PrependUint64Slot(2, read, 0)
def AddRead(builder, read):
EglMakeCurrentAddRead(builder, read)
def EglMakeCurrentEnd(builder):
return builder.EndObject()
def End(builder):
return EglMakeCurrentEnd(builder)
@@ -0,0 +1,89 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EglResizeSurface(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EglResizeSurface()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEglResizeSurface(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EglResizeSurface
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EglResizeSurface
def Display(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglResizeSurface
def Surface(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# EglResizeSurface
def Width(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# EglResizeSurface
def Height(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def EglResizeSurfaceStart(builder):
builder.StartObject(4)
def Start(builder):
EglResizeSurfaceStart(builder)
def EglResizeSurfaceAddDisplay(builder, display):
builder.PrependUint64Slot(0, display, 0)
def AddDisplay(builder, display):
EglResizeSurfaceAddDisplay(builder, display)
def EglResizeSurfaceAddSurface(builder, surface):
builder.PrependUint64Slot(1, surface, 0)
def AddSurface(builder, surface):
EglResizeSurfaceAddSurface(builder, surface)
def EglResizeSurfaceAddWidth(builder, width):
builder.PrependUint32Slot(2, width, 0)
def AddWidth(builder, width):
EglResizeSurfaceAddWidth(builder, width)
def EglResizeSurfaceAddHeight(builder, height):
builder.PrependUint32Slot(3, height, 0)
def AddHeight(builder, height):
EglResizeSurfaceAddHeight(builder, height)
def EglResizeSurfaceEnd(builder):
return builder.EndObject()
def End(builder):
return EglResizeSurfaceEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EglSwapInterval(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EglSwapInterval()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEglSwapInterval(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EglSwapInterval
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EglSwapInterval
def Interval(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def EglSwapIntervalStart(builder):
builder.StartObject(1)
def Start(builder):
EglSwapIntervalStart(builder)
def EglSwapIntervalAddInterval(builder, interval):
builder.PrependInt32Slot(0, interval, 0)
def AddInterval(builder, interval):
EglSwapIntervalAddInterval(builder, interval)
def EglSwapIntervalEnd(builder):
return builder.EndObject()
def End(builder):
return EglSwapIntervalEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EndOcclusionQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EndOcclusionQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEndOcclusionQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EndOcclusionQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EndOcclusionQuery
def Query(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def EndOcclusionQueryStart(builder):
builder.StartObject(1)
def Start(builder):
EndOcclusionQueryStart(builder)
def EndOcclusionQueryAddQuery(builder, query):
builder.PrependUint64Slot(0, query, 0)
def AddQuery(builder, query):
EndOcclusionQueryAddQuery(builder, query)
def EndOcclusionQueryEnd(builder):
return builder.EndObject()
def End(builder):
return EndOcclusionQueryEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EndTimeElapsedQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EndTimeElapsedQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEndTimeElapsedQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EndTimeElapsedQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EndTimeElapsedQuery
def Query(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def EndTimeElapsedQueryStart(builder):
builder.StartObject(1)
def Start(builder):
EndTimeElapsedQueryStart(builder)
def EndTimeElapsedQueryAddQuery(builder, query):
builder.PrependUint64Slot(0, query, 0)
def AddQuery(builder, query):
EndTimeElapsedQueryAddQuery(builder, query)
def EndTimeElapsedQueryEnd(builder):
return builder.EndObject()
def End(builder):
return EndTimeElapsedQueryEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class EndXfbPrimitivesQuery(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EndXfbPrimitivesQuery()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsEndXfbPrimitivesQuery(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# EndXfbPrimitivesQuery
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# EndXfbPrimitivesQuery
def Query(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def EndXfbPrimitivesQueryStart(builder):
builder.StartObject(1)
def Start(builder):
EndXfbPrimitivesQueryStart(builder)
def EndXfbPrimitivesQueryAddQuery(builder, query):
builder.PrependUint64Slot(0, query, 0)
def AddQuery(builder, query):
EndXfbPrimitivesQueryAddQuery(builder, query)
def EndXfbPrimitivesQueryEnd(builder):
return builder.EndObject()
def End(builder):
return EndXfbPrimitivesQueryEnd(builder)
@@ -0,0 +1,63 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class FenceSync(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = FenceSync()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsFenceSync(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# FenceSync
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# FenceSync
def Condition(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# FenceSync
def Flags(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def FenceSyncStart(builder):
builder.StartObject(2)
def Start(builder):
FenceSyncStart(builder)
def FenceSyncAddCondition(builder, condition):
builder.PrependUint32Slot(0, condition, 0)
def AddCondition(builder, condition):
FenceSyncAddCondition(builder, condition)
def FenceSyncAddFlags(builder, flags):
builder.PrependUint32Slot(1, flags, 0)
def AddFlags(builder, flags):
FenceSyncAddFlags(builder, flags)
def FenceSyncEnd(builder):
return builder.EndObject()
def End(builder):
return FenceSyncEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class GenerateMipmap(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GenerateMipmap()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsGenerateMipmap(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# GenerateMipmap
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# GenerateMipmap
def Target(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def GenerateMipmapStart(builder):
builder.StartObject(1)
def Start(builder):
GenerateMipmapStart(builder)
def GenerateMipmapAddTarget(builder, target):
builder.PrependUint32Slot(0, target, 0)
def AddTarget(builder, target):
GenerateMipmapAddTarget(builder, target)
def GenerateMipmapEnd(builder):
return builder.EndObject()
def End(builder):
return GenerateMipmapEnd(builder)
@@ -0,0 +1,63 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class GetQueryResult64(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GetQueryResult64()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsGetQueryResult64(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# GetQueryResult64
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# GetQueryResult64
def Query(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# GetQueryResult64
def Wait(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def GetQueryResult64Start(builder):
builder.StartObject(2)
def Start(builder):
GetQueryResult64Start(builder)
def GetQueryResult64AddQuery(builder, query):
builder.PrependUint64Slot(0, query, 0)
def AddQuery(builder, query):
GetQueryResult64AddQuery(builder, query)
def GetQueryResult64AddWait(builder, wait):
builder.PrependUint32Slot(1, wait, 0)
def AddWait(builder, wait):
GetQueryResult64AddWait(builder, wait)
def GetQueryResult64End(builder):
return builder.EndObject()
def End(builder):
return GetQueryResult64End(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class GetString(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GetString()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsGetString(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# GetString
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# GetString
def Pname(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def GetStringStart(builder):
builder.StartObject(1)
def Start(builder):
GetStringStart(builder)
def GetStringAddPname(builder, pname):
builder.PrependUint32Slot(0, pname, 0)
def AddPname(builder, pname):
GetStringAddPname(builder, pname)
def GetStringEnd(builder):
return builder.EndObject()
def End(builder):
return GetStringEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class GlClear(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GlClear()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsGlClear(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# GlClear
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# GlClear
def Mask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def GlClearStart(builder):
builder.StartObject(1)
def Start(builder):
GlClearStart(builder)
def GlClearAddMask(builder, mask):
builder.PrependUint32Slot(0, mask, 0)
def AddMask(builder, mask):
GlClearAddMask(builder, mask)
def GlClearEnd(builder):
return builder.EndObject()
def End(builder):
return GlClearEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class IsQueryResultAvailable(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = IsQueryResultAvailable()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsIsQueryResultAvailable(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# IsQueryResultAvailable
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# IsQueryResultAvailable
def Query(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def IsQueryResultAvailableStart(builder):
builder.StartObject(1)
def Start(builder):
IsQueryResultAvailableStart(builder)
def IsQueryResultAvailableAddQuery(builder, query):
builder.PrependUint64Slot(0, query, 0)
def AddQuery(builder, query):
IsQueryResultAvailableAddQuery(builder, query)
def IsQueryResultAvailableEnd(builder):
return builder.EndObject()
def End(builder):
return IsQueryResultAvailableEnd(builder)
@@ -0,0 +1,89 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class MapBufferRange(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MapBufferRange()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsMapBufferRange(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# MapBufferRange
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# MapBufferRange
def BufferHandle(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# MapBufferRange
def Offset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# MapBufferRange
def Size(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# MapBufferRange
def Access(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def MapBufferRangeStart(builder):
builder.StartObject(4)
def Start(builder):
MapBufferRangeStart(builder)
def MapBufferRangeAddBufferHandle(builder, bufferHandle):
builder.PrependUint64Slot(0, bufferHandle, 0)
def AddBufferHandle(builder, bufferHandle):
MapBufferRangeAddBufferHandle(builder, bufferHandle)
def MapBufferRangeAddOffset(builder, offset):
builder.PrependUint64Slot(1, offset, 0)
def AddOffset(builder, offset):
MapBufferRangeAddOffset(builder, offset)
def MapBufferRangeAddSize(builder, size):
builder.PrependUint64Slot(2, size, 0)
def AddSize(builder, size):
MapBufferRangeAddSize(builder, size)
def MapBufferRangeAddAccess(builder, access):
builder.PrependUint32Slot(3, access, 0)
def AddAccess(builder, access):
MapBufferRangeAddAccess(builder, access)
def MapBufferRangeEnd(builder):
return builder.EndObject()
def End(builder):
return MapBufferRangeEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class MemoryBarrier(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MemoryBarrier()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsMemoryBarrier(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# MemoryBarrier
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# MemoryBarrier
def Barriers(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def MemoryBarrierStart(builder):
builder.StartObject(1)
def Start(builder):
MemoryBarrierStart(builder)
def MemoryBarrierAddBarriers(builder, barriers):
builder.PrependUint32Slot(0, barriers, 0)
def AddBarriers(builder, barriers):
MemoryBarrierAddBarriers(builder, barriers)
def MemoryBarrierEnd(builder):
return builder.EndObject()
def End(builder):
return MemoryBarrierEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class MemoryBarrierByRegion(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MemoryBarrierByRegion()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsMemoryBarrierByRegion(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# MemoryBarrierByRegion
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# MemoryBarrierByRegion
def Barriers(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def MemoryBarrierByRegionStart(builder):
builder.StartObject(1)
def Start(builder):
MemoryBarrierByRegionStart(builder)
def MemoryBarrierByRegionAddBarriers(builder, barriers):
builder.PrependUint32Slot(0, barriers, 0)
def AddBarriers(builder, barriers):
MemoryBarrierByRegionAddBarriers(builder, barriers)
def MemoryBarrierByRegionEnd(builder):
return builder.EndObject()
def End(builder):
return MemoryBarrierByRegionEnd(builder)
@@ -0,0 +1,67 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Message(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Message()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsMessage(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# Message
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# Message
def Command(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from MobileGL.Protocol.Wire.Command import Command
obj = Command()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Message
def ShmCount(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def MessageStart(builder):
builder.StartObject(2)
def Start(builder):
MessageStart(builder)
def MessageAddCommand(builder, command):
builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(command), 0)
def AddCommand(builder, command):
MessageAddCommand(builder, command)
def MessageAddShmCount(builder, shmCount):
builder.PrependUint32Slot(1, shmCount, 0)
def AddShmCount(builder, shmCount):
MessageAddShmCount(builder, shmCount)
def MessageEnd(builder):
return builder.EndObject()
def End(builder):
return MessageEnd(builder)
@@ -0,0 +1,63 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class PatchParameteri(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PatchParameteri()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsPatchParameteri(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# PatchParameteri
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# PatchParameteri
def Pname(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# PatchParameteri
def Value(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def PatchParameteriStart(builder):
builder.StartObject(2)
def Start(builder):
PatchParameteriStart(builder)
def PatchParameteriAddPname(builder, pname):
builder.PrependUint32Slot(0, pname, 0)
def AddPname(builder, pname):
PatchParameteriAddPname(builder, pname)
def PatchParameteriAddValue(builder, value):
builder.PrependInt32Slot(1, value, 0)
def AddValue(builder, value):
PatchParameteriAddValue(builder, value)
def PatchParameteriEnd(builder):
return builder.EndObject()
def End(builder):
return PatchParameteriEnd(builder)
@@ -0,0 +1,115 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class ReadPixels(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReadPixels()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsReadPixels(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# ReadPixels
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# ReadPixels
def X(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# ReadPixels
def Y(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# ReadPixels
def Width(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# ReadPixels
def Height(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# ReadPixels
def Format(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# ReadPixels
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
def ReadPixelsStart(builder):
builder.StartObject(6)
def Start(builder):
ReadPixelsStart(builder)
def ReadPixelsAddX(builder, x):
builder.PrependInt32Slot(0, x, 0)
def AddX(builder, x):
ReadPixelsAddX(builder, x)
def ReadPixelsAddY(builder, y):
builder.PrependInt32Slot(1, y, 0)
def AddY(builder, y):
ReadPixelsAddY(builder, y)
def ReadPixelsAddWidth(builder, width):
builder.PrependInt32Slot(2, width, 0)
def AddWidth(builder, width):
ReadPixelsAddWidth(builder, width)
def ReadPixelsAddHeight(builder, height):
builder.PrependInt32Slot(3, height, 0)
def AddHeight(builder, height):
ReadPixelsAddHeight(builder, height)
def ReadPixelsAddFormat(builder, format):
builder.PrependUint32Slot(4, format, 0)
def AddFormat(builder, format):
ReadPixelsAddFormat(builder, format)
def ReadPixelsAddType(builder, type):
builder.PrependUint32Slot(5, type, 0)
def AddType(builder, type):
ReadPixelsAddType(builder, type)
def ReadPixelsEnd(builder):
return builder.EndObject()
def End(builder):
return ReadPixelsEnd(builder)
@@ -0,0 +1,128 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Response(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Response()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsResponse(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# Response
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# Response
def Status(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# Response
def Token(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# Response
def DataByte(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# Response
def Sync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# Response
def StringValue(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.String(o + self._tab.Pos)
return None
# Response
def RetShmCount(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# Response
def QueryNs(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def ResponseStart(builder):
builder.StartObject(7)
def Start(builder):
ResponseStart(builder)
def ResponseAddStatus(builder, status):
builder.PrependUint32Slot(0, status, 0)
def AddStatus(builder, status):
ResponseAddStatus(builder, status)
def ResponseAddToken(builder, token):
builder.PrependUint64Slot(1, token, 0)
def AddToken(builder, token):
ResponseAddToken(builder, token)
def ResponseAddDataByte(builder, dataByte):
builder.PrependUint32Slot(2, dataByte, 0)
def AddDataByte(builder, dataByte):
ResponseAddDataByte(builder, dataByte)
def ResponseAddSync(builder, sync):
builder.PrependUint64Slot(3, sync, 0)
def AddSync(builder, sync):
ResponseAddSync(builder, sync)
def ResponseAddStringValue(builder, stringValue):
builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(stringValue), 0)
def AddStringValue(builder, stringValue):
ResponseAddStringValue(builder, stringValue)
def ResponseAddRetShmCount(builder, retShmCount):
builder.PrependUint32Slot(5, retShmCount, 0)
def AddRetShmCount(builder, retShmCount):
ResponseAddRetShmCount(builder, retShmCount)
def ResponseAddQueryNs(builder, queryNs):
builder.PrependUint64Slot(6, queryNs, 0)
def AddQueryNs(builder, queryNs):
ResponseAddQueryNs(builder, queryNs)
def ResponseEnd(builder):
return builder.EndObject()
def End(builder):
return ResponseEnd(builder)
@@ -0,0 +1,50 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class SwapBuffers(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SwapBuffers()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsSwapBuffers(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# SwapBuffers
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# SwapBuffers
def Draw(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def SwapBuffersStart(builder):
builder.StartObject(1)
def Start(builder):
SwapBuffersStart(builder)
def SwapBuffersAddDraw(builder, draw):
builder.PrependUint64Slot(0, draw, 0)
def AddDraw(builder, draw):
SwapBuffersAddDraw(builder, draw)
def SwapBuffersEnd(builder):
return builder.EndObject()
def End(builder):
return SwapBuffersEnd(builder)
@@ -0,0 +1,141 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class TextureRespecify(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TextureRespecify()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsTextureRespecify(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# TextureRespecify
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# TextureRespecify
def Texture(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def Level(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def Format(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def Width(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def Height(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def Depth(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureRespecify
def DataSize(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def TextureRespecifyStart(builder):
builder.StartObject(8)
def Start(builder):
TextureRespecifyStart(builder)
def TextureRespecifyAddTexture(builder, texture):
builder.PrependUint64Slot(0, texture, 0)
def AddTexture(builder, texture):
TextureRespecifyAddTexture(builder, texture)
def TextureRespecifyAddLevel(builder, level):
builder.PrependUint32Slot(1, level, 0)
def AddLevel(builder, level):
TextureRespecifyAddLevel(builder, level)
def TextureRespecifyAddFormat(builder, format):
builder.PrependUint32Slot(2, format, 0)
def AddFormat(builder, format):
TextureRespecifyAddFormat(builder, format)
def TextureRespecifyAddType(builder, type):
builder.PrependUint32Slot(3, type, 0)
def AddType(builder, type):
TextureRespecifyAddType(builder, type)
def TextureRespecifyAddWidth(builder, width):
builder.PrependUint32Slot(4, width, 0)
def AddWidth(builder, width):
TextureRespecifyAddWidth(builder, width)
def TextureRespecifyAddHeight(builder, height):
builder.PrependUint32Slot(5, height, 0)
def AddHeight(builder, height):
TextureRespecifyAddHeight(builder, height)
def TextureRespecifyAddDepth(builder, depth):
builder.PrependUint32Slot(6, depth, 0)
def AddDepth(builder, depth):
TextureRespecifyAddDepth(builder, depth)
def TextureRespecifyAddDataSize(builder, dataSize):
builder.PrependUint64Slot(7, dataSize, 0)
def AddDataSize(builder, dataSize):
TextureRespecifyAddDataSize(builder, dataSize)
def TextureRespecifyEnd(builder):
return builder.EndObject()
def End(builder):
return TextureRespecifyEnd(builder)
@@ -0,0 +1,141 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class TextureSubImage(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TextureSubImage()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsTextureSubImage(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# TextureSubImage
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# TextureSubImage
def Texture(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def Level(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def Format(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def Width(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def Height(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def Depth(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# TextureSubImage
def DataSize(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def TextureSubImageStart(builder):
builder.StartObject(8)
def Start(builder):
TextureSubImageStart(builder)
def TextureSubImageAddTexture(builder, texture):
builder.PrependUint64Slot(0, texture, 0)
def AddTexture(builder, texture):
TextureSubImageAddTexture(builder, texture)
def TextureSubImageAddLevel(builder, level):
builder.PrependUint32Slot(1, level, 0)
def AddLevel(builder, level):
TextureSubImageAddLevel(builder, level)
def TextureSubImageAddFormat(builder, format):
builder.PrependUint32Slot(2, format, 0)
def AddFormat(builder, format):
TextureSubImageAddFormat(builder, format)
def TextureSubImageAddType(builder, type):
builder.PrependUint32Slot(3, type, 0)
def AddType(builder, type):
TextureSubImageAddType(builder, type)
def TextureSubImageAddWidth(builder, width):
builder.PrependUint32Slot(4, width, 0)
def AddWidth(builder, width):
TextureSubImageAddWidth(builder, width)
def TextureSubImageAddHeight(builder, height):
builder.PrependUint32Slot(5, height, 0)
def AddHeight(builder, height):
TextureSubImageAddHeight(builder, height)
def TextureSubImageAddDepth(builder, depth):
builder.PrependUint32Slot(6, depth, 0)
def AddDepth(builder, depth):
TextureSubImageAddDepth(builder, depth)
def TextureSubImageAddDataSize(builder, dataSize):
builder.PrependUint64Slot(7, dataSize, 0)
def AddDataSize(builder, dataSize):
TextureSubImageAddDataSize(builder, dataSize)
def TextureSubImageEnd(builder):
return builder.EndObject()
def End(builder):
return TextureSubImageEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class UnmapBuffer(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = UnmapBuffer()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsUnmapBuffer(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# UnmapBuffer
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# UnmapBuffer
def BufferHandle(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# UnmapBuffer
def Offset(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# UnmapBuffer
def Size(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def UnmapBufferStart(builder):
builder.StartObject(3)
def Start(builder):
UnmapBufferStart(builder)
def UnmapBufferAddBufferHandle(builder, bufferHandle):
builder.PrependUint64Slot(0, bufferHandle, 0)
def AddBufferHandle(builder, bufferHandle):
UnmapBufferAddBufferHandle(builder, bufferHandle)
def UnmapBufferAddOffset(builder, offset):
builder.PrependUint64Slot(1, offset, 0)
def AddOffset(builder, offset):
UnmapBufferAddOffset(builder, offset)
def UnmapBufferAddSize(builder, size):
builder.PrependUint64Slot(2, size, 0)
def AddSize(builder, size):
UnmapBufferAddSize(builder, size)
def UnmapBufferEnd(builder):
return builder.EndObject()
def End(builder):
return UnmapBufferEnd(builder)
@@ -0,0 +1,76 @@
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: Wire
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class WaitSync(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = WaitSync()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsWaitSync(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# WaitSync
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# WaitSync
def Sync(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
# WaitSync
def Flags(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# WaitSync
def Timeout(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
def WaitSyncStart(builder):
builder.StartObject(3)
def Start(builder):
WaitSyncStart(builder)
def WaitSyncAddSync(builder, sync):
builder.PrependUint64Slot(0, sync, 0)
def AddSync(builder, sync):
WaitSyncAddSync(builder, sync)
def WaitSyncAddFlags(builder, flags):
builder.PrependUint32Slot(1, flags, 0)
def AddFlags(builder, flags):
WaitSyncAddFlags(builder, flags)
def WaitSyncAddTimeout(builder, timeout):
builder.PrependUint64Slot(2, timeout, 0)
def AddTimeout(builder, timeout):
WaitSyncAddTimeout(builder, timeout)
def WaitSyncEnd(builder):
return builder.EndObject()
def End(builder):
return WaitSyncEnd(builder)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,209 @@
# MobileGL wire dispatch unsupported report (generated)
21 eglGetCurrentContext unsupported payload signature
22 eglGetCurrentDisplay unsupported payload signature
28 eglGetProcAddress unsupported payload signature
32 eglQueryAPI unsupported payload signature
37 eglReleaseThread unsupported payload signature
42 eglWaitClient unsupported payload signature
43 eglWaitGL unsupported payload signature
49 glApplyFramebufferAttachmentCMAAINTEL unsupported payload signature
63 glBindBuffersRange unsupported payload signature
67 glBindFramebufferEXT no payload table
73 glBindRenderbufferEXT no payload table
83 glBindVertexBuffers unsupported payload signature
84 glBlendBarrierKHR unsupported payload signature
85 glBlendBarrierNV unsupported payload signature
111 glCheckFramebufferStatusEXT no payload table
146 glCompileShaderIncludeARB unsupported payload signature
202 glCreateProgram no payload table
209 glCreateShaderProgramv unsupported payload signature
211 glCreateSyncFromCLeventARB unsupported payload signature
216 glDebugMessageCallback unsupported payload signature
217 glDebugMessageCallbackARB no payload table
219 glDebugMessageControlARB no payload table
221 glDebugMessageInsertARB no payload table
225 glDeleteFramebuffersEXT no payload table
234 glDeleteRenderbuffersEXT no payload table
268 glDrawArraysInstancedARB no payload table
270 glDrawArraysInstancedEXT no payload table
274 glDrawCommandsNV unsupported payload signature
276 glDrawCommandsStatesNV unsupported payload signature
281 glDrawElementsInstancedARB no payload table
285 glDrawElementsInstancedEXT no payload table
286 glDrawMeshTasksEXT no payload table
287 glDrawMeshTasksIndirectEXT no payload table
297 glEGLImageTargetTexStorageEXT unsupported payload signature
298 glEGLImageTargetTextureStorageEXT unsupported payload signature
309 glEndConditionalRender no payload table
310 glEndConditionalRenderNV unsupported payload signature
315 glEndTransformFeedback no payload table
316 glEvaluateDepthValuesARB unsupported payload signature
318 glFinish no payload table
319 glFlush no payload table
327 glFramebufferFetchBarrierEXT unsupported payload signature
332 glFramebufferRenderbufferEXT no payload table
335 glFramebufferShadingRateEXT no payload table
340 glFramebufferTexture2DEXT no payload table
343 glFramebufferTextureARB no payload table
346 glFramebufferTextureLayerARB no payload table
351 glGenFramebuffersEXT no payload table
357 glGenRenderbuffersEXT no payload table
363 glGenerateMipmapEXT no payload table
368 glGetActiveAttrib unsupported payload signature
369 glGetActiveSubroutineName unsupported payload signature
370 glGetActiveSubroutineUniformName unsupported payload signature
372 glGetActiveUniform unsupported payload signature
373 glGetActiveUniformBlockName unsupported payload signature
375 glGetActiveUniformName unsupported payload signature
385 glGetBufferPointerv unsupported payload signature
394 glGetDebugMessageLog unsupported payload signature
395 glGetDebugMessageLogARB no payload table
400 glGetError no payload table
408 glGetFragmentShadingRatesEXT no payload table
410 glGetFramebufferAttachmentParameterivEXT no payload table
412 glGetFramebufferParameterivEXT no payload table
414 glGetGraphicsResetStatus no payload table
415 glGetGraphicsResetStatusARB no payload table
446 glGetNamedBufferPointerv unsupported payload signature
447 glGetNamedBufferPointervEXT unsupported payload signature
462 glGetNamedStringARB unsupported payload signature
465 glGetObjectLabel unsupported payload signature
466 glGetObjectLabelEXT no payload table
467 glGetObjectPtrLabel unsupported payload signature
477 glGetPerfCounterInfoINTEL unsupported payload signature
480 glGetPerfMonitorCounterStringAMD unsupported payload signature
482 glGetPerfMonitorGroupStringAMD unsupported payload signature
485 glGetPerfQueryIdByNameINTEL unsupported payload signature
486 glGetPerfQueryInfoINTEL unsupported payload signature
487 glGetPointerIndexedvEXT unsupported payload signature
488 glGetPointeri_vEXT unsupported payload signature
489 glGetPointerv unsupported payload signature
491 glGetProgramInfoLog unsupported payload signature
493 glGetProgramPipelineInfoLog unsupported payload signature
498 glGetProgramResourceName unsupported payload signature
514 glGetRenderbufferParameterivEXT no payload table
519 glGetShaderInfoLog unsupported payload signature
521 glGetShaderSource unsupported payload signature
557 glGetTransformFeedbackVarying unsupported payload signature
562 glGetUniformIndices unsupported payload signature
577 glGetVertexArrayPointeri_vEXT unsupported payload signature
578 glGetVertexArrayPointervEXT unsupported payload signature
586 glGetVertexAttribPointerv unsupported payload signature
598 glGetnUniformfvARB no payload table
601 glGetnUniformivARB no payload table
604 glGetnUniformuivARB no payload table
624 glIsFramebufferEXT no payload table
636 glIsRenderbufferEXT no payload table
645 glIsTransformFeedbackNV no payload table
650 glListDrawCommandsStatesClientNV unsupported payload signature
666 glMapNamedBuffer no payload table
667 glMapNamedBufferEXT no payload table
668 glMapNamedBufferRange no payload table
669 glMapNamedBufferRangeEXT no payload table
700 glMinSampleShadingARB no payload table
707 glMultiDrawElements unsupported payload signature
708 glMultiDrawElementsBaseVertex unsupported payload signature
714 glMultiDrawMeshTasksIndirectCountEXT no payload table
716 glMultiDrawMeshTasksIndirectEXT no payload table
771 glNamedFramebufferTextureMultiviewOVR no payload table
814 glPauseTransformFeedback no payload table
827 glPopDebugGroup no payload table
828 glPopGroupMarkerEXT unsupported payload signature
833 glProgramParameteriARB no payload table
840 glProgramUniform1fEXT no payload table
842 glProgramUniform1fvEXT no payload table
848 glProgramUniform1iEXT no payload table
850 glProgramUniform1ivEXT no payload table
856 glProgramUniform1uiEXT no payload table
858 glProgramUniform1uivEXT no payload table
864 glProgramUniform2fEXT no payload table
866 glProgramUniform2fvEXT no payload table
872 glProgramUniform2iEXT no payload table
874 glProgramUniform2ivEXT no payload table
880 glProgramUniform2uiEXT no payload table
882 glProgramUniform2uivEXT no payload table
888 glProgramUniform3fEXT no payload table
890 glProgramUniform3fvEXT no payload table
896 glProgramUniform3iEXT no payload table
898 glProgramUniform3ivEXT no payload table
904 glProgramUniform3uiEXT no payload table
906 glProgramUniform3uivEXT no payload table
912 glProgramUniform4fEXT no payload table
914 glProgramUniform4fvEXT no payload table
920 glProgramUniform4iEXT no payload table
922 glProgramUniform4ivEXT no payload table
928 glProgramUniform4uiEXT no payload table
930 glProgramUniform4uivEXT no payload table
938 glProgramUniformMatrix2fvEXT no payload table
942 glProgramUniformMatrix2x3fvEXT no payload table
946 glProgramUniformMatrix2x4fvEXT no payload table
950 glProgramUniformMatrix3fvEXT no payload table
954 glProgramUniformMatrix3x2fvEXT no payload table
958 glProgramUniformMatrix3x4fvEXT no payload table
962 glProgramUniformMatrix4fvEXT no payload table
966 glProgramUniformMatrix4x2fvEXT no payload table
970 glProgramUniformMatrix4x3fvEXT no payload table
982 glReadnPixelsARB no payload table
983 glReleaseShaderCompiler no payload table
985 glRenderbufferStorageEXT no payload table
990 glResolveDepthValuesNV unsupported payload signature
991 glResumeTransformFeedback no payload table
1009 glShaderSource unsupported payload signature
1011 glShadingRateCombinerOpsEXT no payload table
1012 glShadingRateEXT no payload table
1039 glTexBufferARB no payload table
1055 glTexStorage1D no payload table
1058 glTexStorage2DEXT no payload table
1061 glTexStorage3DEXT no payload table
1067 glTextureBarrier unsupported payload signature
1068 glTextureBarrierNV unsupported payload signature
1110 glTransformFeedbackVaryings unsupported payload signature
1235 glVertexArrayVertexBuffers unsupported payload signature
1275 glVertexAttribDivisorARB no payload table
1350 glWindowRectanglesEXT no payload table
1351 glXChooseFBConfig no payload table
1352 glXChooseVisual no payload table
1353 glXCopyContext no payload table
1354 glXCreateContext no payload table
1355 glXCreateContextAttribsARB no payload table
1356 glXCreateGLXPixmap no payload table
1357 glXCreateNewContext no payload table
1358 glXCreatePbuffer no payload table
1359 glXCreatePixmap no payload table
1360 glXCreateWindow no payload table
1361 glXDestroyContext no payload table
1362 glXDestroyGLXPixmap no payload table
1363 glXDestroyPbuffer no payload table
1364 glXDestroyPixmap no payload table
1365 glXDestroyWindow no payload table
1366 glXGetClientString no payload table
1367 glXGetConfig no payload table
1368 glXGetCurrentContext no payload table
1369 glXGetCurrentDisplay no payload table
1370 glXGetCurrentDrawable no payload table
1371 glXGetCurrentReadDrawable no payload table
1372 glXGetFBConfigAttrib no payload table
1373 glXGetFBConfigs no payload table
1374 glXGetProcAddress no payload table
1375 glXGetProcAddressARB no payload table
1376 glXGetSelectedEvent no payload table
1377 glXGetSwapIntervalMESA no payload table
1378 glXGetVisualFromFBConfig no payload table
1379 glXIsDirect no payload table
1380 glXMakeContextCurrent no payload table
1381 glXMakeCurrent no payload table
1382 glXQueryContext no payload table
1383 glXQueryDrawable no payload table
1384 glXQueryExtension no payload table
1385 glXQueryExtensionsString no payload table
1386 glXQueryServerString no payload table
1387 glXQueryVersion no payload table
1388 glXSelectEvent no payload table
1389 glXSwapBuffers no payload table
1390 glXSwapIntervalEXT no payload table
1391 glXSwapIntervalMESA no payload table
1392 glXSwapIntervalSGI no payload table
1393 glXUseXFont no payload table
1394 glXWaitGL no payload table
1395 glXWaitX no payload table
1396 glx no payload table
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -231,9 +231,9 @@ handle", and it is what `MGPipeResourceRespecifyWantsItsReply` (`PipeRoute.h`) a
does not hold. It was given a WINDOW instead of a rule - `MOBILEGL_IPC_CREATE_WINDOW`, answers does not hold. It was given a WINDOW instead of a rule - `MOBILEGL_IPC_CREATE_WINDOW`, answers
deferred and collected in order, a late DECLINE un-latching the object - and **the window is OFF deferred and collected in order, a late DECLINE un-latching the object - and **the window is OFF
BY DEFAULT because the deferral was measured and cannot be collected**: the reply pool is BY DEFAULT because the deferral was measured and cannot be collected**: the reply pool is
`kDefaultReplySlotCount` = 8 slots deep and one load frame posts 59,673 replies (the server `kDefaultReplySlotCount` = 8 slots deep and one load frame posts 55,903 replies (the server
answers every reply-owning record whether or not the client wants the answer), so an answer is answers every reply-owning record whether or not the client wants the answer), so an answer is
overwritten after 8 replies - 0.61 of a create. On the device all 4,536 creates took the blocking overwritten after 8 replies - 0.65 of a create. On the device all 4,536 creates took the blocking
path at window 4 and at window 1 alike (28.64 s both ways, against the handoff's 31.3 s path at window 4 and at window 1 alike (28.64 s both ways, against the handoff's 31.3 s
pre-window baseline on the same device). `WireTables.cpp`'s section comment carries the counters pre-window baseline on the same device). `WireTables.cpp`'s section comment carries the counters
and the arithmetic. The client-visible consequence is worth stating here: with the window ON, the and the arithmetic. The client-visible consequence is worth stating here: with the window ON, the
+36 -2
View File
@@ -1801,7 +1801,7 @@ namespace MobileGL::MG_Remote::Client {
Uint64 payloadBytes, const Wire::WireTail* tails, Uint64 payloadBytes, const Wire::WireTail* tails,
Uint32 tailCount, void* replyOut, Uint64 replyBytes, Uint32 tailCount, void* replyOut, Uint64 replyBytes,
Int32* statusOut, Uint64* replySizeOut, Int32* statusOut, Uint64* replySizeOut,
Bool wantReply) { Bool wantReply, Bool willReadReply) {
Uint64 varTailBytes = 0; Uint64 varTailBytes = 0;
for (Uint32 i = 0; i < tailCount; ++i) varTailBytes += tails[i].Size; for (Uint32 i = 0; i < tailCount; ++i) varTailBytes += tails[i].Size;
if (statusOut != nullptr) *statusOut = Wire::ReplySink::kStatusError; if (statusOut != nullptr) *statusOut = Wire::ReplySink::kStatusError;
@@ -1838,7 +1838,24 @@ namespace MobileGL::MG_Remote::Client {
const Bool rowCarriesReplySlot = const Bool rowCarriesReplySlot =
(MG_Pipe::MGPipeCallFlagsFor(op) & static_cast<Uint32>(MG_Pipe::kReplySlot)) != 0; (MG_Pipe::MGPipeCallFlagsFor(op) & static_cast<Uint32>(MG_Pipe::kReplySlot)) != 0;
const Bool ownsReplySlot = rowCarriesReplySlot && wantReply; const Bool ownsReplySlot = rowCarriesReplySlot && wantReply;
Uint64 seq = m_encoder.EncodeRecord(op, payload, payloadBytes, tails, tailCount); // P12: THE SKIP THE SERVER MAY TAKE, and the two ways a caller may not ask for it. See
// the declaration in ClientSession.h - the create window is why wantReply is not the
// question, and a Fatal rather than an assert because both mistakes are silent: one
// blocks on an answer nobody will send, the other discards an answer that never existed.
if (wantReply && !willReadReply) {
SessionFail(MGFatalFamily::ReplyError, "MGPipe: Fatal{ReplyError, \"%s\"} - the caller asked to"
" block on this record's answer AND declared that nobody will read it; the server"
" would skip the answer this call is about to wait for",
Wire::WireOpName(op));
}
if (!willReadReply && !rowCarriesReplySlot) {
SessionFail(MGFatalFamily::ReplyError, "MGPipe: Fatal{ReplyError, \"%s\"} - the caller declared this"
" record's answer unread, but the row carries no reply slot: there was no answer to"
" skip, so the declaration is a mistake about which row this is",
Wire::WireOpName(op));
}
const Bool skipAnswer = rowCarriesReplySlot && !willReadReply;
Uint64 seq = m_encoder.EncodeRecord(op, payload, payloadBytes, tails, tailCount, skipAnswer);
if (seq == Wire::kInvalidSeq) { if (seq == Wire::kInvalidSeq) {
if (DeviceLost() || m_encoder.Cancelled()) return declineCancelled(); if (DeviceLost() || m_encoder.Cancelled()) return declineCancelled();
// EncodeRecord already refused individually oversized records. This one fits, // EncodeRecord already refused individually oversized records. This one fits,
@@ -1881,6 +1898,17 @@ namespace MobileGL::MG_Remote::Client {
// creates or parameter sets, and those three have different fixes. // creates or parameter sets, and those three have different fixes.
const auto replyMetricStart = const auto replyMetricStart =
Transport::LinkMetricsBeginReply(ownsReplySlot, static_cast<std::uint32_t>(op)); Transport::LinkMetricsBeginReply(ownsReplySlot, static_cast<std::uint32_t>(op));
// P12: the residency clock AND the declaration, both placed HERE - after EncodeRecord has
// an ordinal and BEFORE the publish, which is the only window in which the declaration is
// guaranteed to precede its own answer. A call that declined before encoding emits nothing
// and must not advance either.
if (rowCarriesReplySlot) ++m_replyPostings;
// THE DECLARATION THAT LETS A LINK RETAIN THIS ANSWER (P12). willReadReply, not wantReply:
// the create window emits without waiting and reads afterwards, so its records must be
// declared even though this call does not read them. Links that cannot retain ignore it,
// and the window does not defer on them (see ClientSession::LinkRetainsReplies).
if (rowCarriesReplySlot && willReadReply && m_link != nullptr)
m_link->DeclareReplyRead(seq);
m_producer.PublishAndNotify(seq); m_producer.PublishAndNotify(seq);
if (op == MG_Pipe::MGPWireOp::Present) { if (op == MG_Pipe::MGPWireOp::Present) {
// A credit is permission to run ahead, not permission to retain the // A credit is permission to run ahead, not permission to retain the
@@ -2441,6 +2469,12 @@ namespace MobileGL::MG_Remote::Client {
return m_producer.WaitForApplied(seq, timeoutMs); return m_producer.WaitForApplied(seq, timeoutMs);
} }
Uint64 ClientSession::ReplyPostings() const { return m_replyPostings; }
Bool ClientSession::LinkRetainsReplies() const {
return m_link != nullptr && m_link->Capabilities().RetainsReplies;
}
Bool ClientSession::ReadReply(Uint64 seq, void* outBytes, Uint64 outCapacity, Int32* outStatus, Bool ClientSession::ReadReply(Uint64 seq, void* outBytes, Uint64 outCapacity, Int32* outStatus,
Uint64* outSize) { Uint64* outSize) {
const void* bytes = nullptr; Uint64 size = 0; Int32 status = 0; const void* bytes = nullptr; Uint64 size = 0; Int32 status = 0;
+40 -1
View File
@@ -211,7 +211,26 @@ namespace MobileGL::MG_Remote::Client {
Uint64 EmitAndWaitTails(MG_Pipe::MGPWireOp op, const void* payload, Uint64 payloadBytes, Uint64 EmitAndWaitTails(MG_Pipe::MGPWireOp op, const void* payload, Uint64 payloadBytes,
const Wire::WireTail* tails, Uint32 tailCount, void* replyOut, const Wire::WireTail* tails, Uint32 tailCount, void* replyOut,
Uint64 replyBytes, Int32* statusOut, Uint64 replyBytes, Int32* statusOut,
Uint64* replySizeOut = nullptr, Bool wantReply = true); Uint64* replySizeOut = nullptr, Bool wantReply = true,
Bool willReadReply = true);
// `willReadReply` (P12) and `wantReply` ARE TWO QUESTIONS AND MUST STAY TWO.
//
// wantReply does THIS CALL read the answer (it blocks on the barrier and takes the
// reply slot before returning);
// willReadReply will the answer be read AT ALL - now, or later by somebody else.
//
// The create window is the case that makes the difference load-bearing: it emits with
// wantReply=false and its answers are read afterwards by the window's drain, so a record
// it emits must still be ANSWERED. Only willReadReply=false tells the server it may skip
// the answer (Transport::kRecNoReply), and only three sites may say it: the parameter row
// for a confirmed object, the respecify row's fire-and-forget half, and the sub-data row
// - each of which answers its own caller locally and reads nothing from the wire.
//
// THE TWO ILLEGAL COMBINATIONS ARE FATAL BY NAME rather than ignored, because both would
// fail silently in opposite directions: wantReply && !willReadReply is a caller blocking
// on an answer it has just told the server not to send, and !willReadReply on a row with
// no reply slot is a caller discarding an answer that never existed.
// MOBILEGL_IPC_VERB_BARRIER. False is the R-1 negative control and is EXPECTED to be // MOBILEGL_IPC_VERB_BARRIER. False is the R-1 negative control and is EXPECTED to be
// red; it must be run once and the way it goes red recorded. // red; it must be run once and the way it goes red recorded.
@@ -361,6 +380,25 @@ namespace MobileGL::MG_Remote::Client {
// only way a client blocked in the barrier survives a server that went away. // only way a client blocked in the barrier survives a server that went away.
Transport::SessionWait WaitForApplied(Uint64 seq, Uint32 timeoutMs); Transport::SessionWait WaitForApplied(Uint64 seq, Uint32 timeoutMs);
// P12: HOW MANY REPLY-OWNING RECORDS THIS CLIENT HAS EMITTED, the clock a deferred
// answer's RESIDENCY is measured against. An answer is readable only until the bounded
// reply buffer reuses its slot, so a caller that defers an answer (the create window)
// has to know how many other answers have gone by since it was posted.
//
// EVERY reply-slot row is counted, not only the rows this client waits for, and that is
// the conservative direction on purpose: a server that ignores the no-reply bit answers
// records the client does not read, and those answers displace a deferred one just the
// same. A budget that counted only "answers I will read" would be wrong in exactly the
// deployment where it matters most.
Uint64 ReplyPostings() const;
// P12: DOES THIS LINK KEEP AN ANSWER UNTIL ITS READER TAKES IT? The create window defers
// answers across an unbounded amount of other traffic, which only works where the answer
// is still there when the drain comes back - measured: a bounded buffer of the last N
// answers never is. On a link that answers false the window must not defer at all, so
// this is what CreateWindowEffective() is gated on.
Bool LinkRetainsReplies() const;
// The reply slot for `seq`, addressed seq % slots with the seq stamped back into the // The reply slot for `seq`, addressed seq % slots with the seq stamped back into the
// header for self-check (R-3). `outStatus` is 0 OK / 1 DECLINED / 2 ERROR, and // header for self-check (R-3). `outStatus` is 0 OK / 1 DECLINED / 2 ERROR, and
// DECLINED IS A REAL ANSWER - MapPersistent's nullptr and the four Bool acceptances. // DECLINED IS A REAL ANSWER - MapPersistent's nullptr and the four Bool acceptances.
@@ -494,6 +532,7 @@ namespace MobileGL::MG_Remote::Client {
Transport::EventRingConsumer* m_events = nullptr; Transport::EventRingConsumer* m_events = nullptr;
Transport::ITransport* m_transport = nullptr; Transport::ITransport* m_transport = nullptr;
Bool m_started = false; Bool m_started = false;
Uint64 m_replyPostings = 0; // P12: the residency budget's clock (ReplyPostings())
// Written by whichever thread first notices the hangup - the GL thread in the barrier, // Written by whichever thread first notices the hangup - the GL thread in the barrier,
// or the event pump - and read by glGetGraphicsResetStatus on the GL thread. // or the event pump - and read by glGetGraphicsResetStatus on the GL thread.
std::atomic<bool> m_deviceLost{false}; std::atomic<bool> m_deviceLost{false};
+124 -13
View File
@@ -54,6 +54,8 @@
// P12: kDefaultReplySlotCount, because the create window's ceiling is derived from the pool it // P12: kDefaultReplySlotCount, because the create window's ceiling is derived from the pool it
// shares rather than from a number written twice (see kCreateWindowMax below). // shares rather than from a number written twice (see kCreateWindowMax below).
#include <MG_Remote/Transport/ReplySlot.h> #include <MG_Remote/Transport/ReplySlot.h>
// P12: LinkMetricsBeginReply/ReplyApplied, so the window's blocking take is visible in by_op 2.
#include <MG_Remote/Transport/LinkMetrics.h>
#include <atomic> #include <atomic>
#include <cstdlib> #include <cstdlib>
@@ -343,17 +345,32 @@ namespace MobileGL::MG_Remote::Client {
// readfail=8,951, pending pinned at 4. The drain READ the window's answers back and failed // readfail=8,951, pending pinned at 4. The drain READ the window's answers back and failed
// every time. // every time.
// //
// ---- AND THE DIAGNOSIS BELOW WAS HALF WRONG; READ THIS FIRST ----------------------
//
// The arithmetic that follows is real and the no-reply bit it motivated WORKS (measured:
// the server skipped 50,001 answers and wrote 4,521, cutting a frame's replies by 92%).
// IT DID NOT FIX THE WINDOW: the drain still read back nothing (readfail 8,951 -> 8,872,
// -0.9%). The binding constraint is not how fast the bounded buffer is overwritten but
// that the drain is STRICTLY FIFO AND HAS NO WAY OUT OF A FAILED READ: it retries the
// same head for ever. Measured on the device (P12miss): `want=310` on every miss while
// `replySeq` climbed from 1,504 to 102,915 - one answer lost to a bounded buffer wedges
// the window permanently, and with 4,536 deferred answers that is a certainty rather
// than a risk. notes/p12/CREATE-WINDOW-MEASURED.md section 8 has the numbers and the
// shape of the fix (abandon the head: un-latch the object, add it to the suspect list,
// and pop - the DECLINE path reused for "unknown").
//
// WHY, IN THE PROTOCOL'S OWN ARITHMETIC. An answer is readable only until its reply-pool // WHY, IN THE PROTOCOL'S OWN ARITHMETIC. An answer is readable only until its reply-pool
// slot is reused, and the pool is kDefaultReplySlotCount = 8 slots deep. The frame posts a // slot is reused, and the pool is kDefaultReplySlotCount = 8 slots deep. The frame posts a
// reply for EVERY reply-owning record - not only for the rows that wait, because the server // reply for EVERY reply-owning record - not only for the rows that wait, because the server
// cannot know which those are (ClientSession.cpp:1897-1900: "The server posts either way") // cannot know which those are (ClientSession.cpp:1897-1900: "The server posts either way")
// - and that is 59,673 replies in this one frame: // - and that is 55,903 replies in this one frame (op 4 ResourceDestroy is NOT counted: its
// catalogue flags are kNone, so PostReply would Fatal on it and it never answers):
// //
// create 4,536 + respecify 20,633 + params 18,056 + sub-data 12,671 + 3,770 + 6 + 1 // create 4,536 + respecify 20,633 + params 18,056 + sub-data 12,671 + 3,770 + 6 + 1
// //
// 8 slots against 59,673 replies is a pool that churns 7,459 times per frame, i.e. 13.2 // 8 slots against 55,903 replies is a pool that churns 6,988 times per frame, i.e. 12.3
// replies between two creates: an answer posted at create N is overwritten after EIGHT // replies between two creates: an answer posted at create N is overwritten after EIGHT
// replies, which is 0.61 of a create. There is no window depth for which the deferred // replies, which is 0.65 of a create. There is no window depth for which the deferred
// answer still exists when the client comes back for it - the deferral is not slow, it is // answer still exists when the client comes back for it - the deferral is not slow, it is
// UNREADABLE. (A 1-deep "window" is the blocking path, which is what the row does.) // UNREADABLE. (A 1-deep "window" is the blocking path, which is what the row does.)
// //
@@ -364,8 +381,13 @@ namespace MobileGL::MG_Remote::Client {
// prevent. So the default is 1: the row is the pre-window shape unless someone sets // prevent. So the default is 1: the row is the pre-window shape unless someone sets
// MOBILEGL_IPC_CREATE_WINDOW explicitly, and the machinery below is kept as the record of // MOBILEGL_IPC_CREATE_WINDOW explicitly, and the machinery below is kept as the record of
// what was tried and what it cost (a fix would have to make a deferred answer outlive // what was tried and what it cost (a fix would have to make a deferred answer outlive
// 59,673 intervening replies, which means a deeper pool or a way for the client to tell // 12.3 intervening replies, which means a deeper pool, or NOT sending the ~51,000 answers
// the server "do not answer this one" - both are wire changes, not tuning). // nobody will read - and that second one needs its predicate stated exactly, because
// "fire-and-forget" is the WRONG one: the window's own creates are fire-and-forget and
// the drain above reads them, so a bit keyed on wantReply disables the mechanism it is
// meant to enable. The bit has to mean "this answer will never be read" - which is true
// of respecify/params/sub-data and false of a windowed create. See
// docs/Disaggregated/notes/p12/CREATE-WINDOW-MEASURED.md section 7, reviewed).
// //
// The gates that pin it are in MG_Test/Wire/RemoteClientControls.inc, and they still hold: // The gates that pin it are in MG_Test/Wire/RemoteClientControls.inc, and they still hold:
// the window is a coherent mechanism, it is simply unusable on a frame with this much // the window is a coherent mechanism, it is simply unusable on a frame with this much
@@ -394,11 +416,19 @@ namespace MobileGL::MG_Remote::Client {
Uint64 Seq = 0; Uint64 Seq = 0;
MG_Pipe::MGPipeKind Kind = MG_Pipe::MGPipeKind::None; MG_Pipe::MGPipeKind Kind = MG_Pipe::MGPipeKind::None;
MG_Pipe::MGPipeHandle Handle{}; MG_Pipe::MGPipeHandle Handle{};
}; };
PendingCreate g_createWindow[kCreateWindowMax]; PendingCreate g_createWindow[kCreateWindowMax];
Uint32 g_createWindowHead = 0; Uint32 g_createWindowHead = 0;
Uint32 g_createWindowCount = 0; Uint32 g_createWindowCount = 0;
Uint64 g_createRefusals = 0; Uint64 g_createRefusals = 0;
// How many deferred answers the window has actually TAKEN BACK, which is the one number
// that says the deferral worked rather than merely happened. It is not inferable from the
// others: `pending` staying at the ceiling is consistent BOTH with a drain that collects
// one per create and with a drain that collects nothing while a server-skip keeps the
// answers from existing at all - the second is what a no-reply bit keyed on wantReply
// would produce, and it would leave every other reading green.
Uint64 g_createWindowTaken = 0;
// A HANDLE WHOSE CREATE CAME BACK DECLINED IS NEVER WINDOWED AGAIN. Without this the window // A HANDLE WHOSE CREATE CAME BACK DECLINED IS NEVER WINDOWED AGAIN. Without this the window
// would UNDO the repair it exists to keep: every later use of the object sends another create, // would UNDO the repair it exists to keep: every later use of the object sends another create,
@@ -453,8 +483,19 @@ namespace MobileGL::MG_Remote::Client {
Bool blocking = blockForOldest; Bool blocking = blockForOldest;
while (g_createWindowCount != 0) { while (g_createWindowCount != 0) {
const PendingCreate head = g_createWindow[g_createWindowHead]; const PendingCreate head = g_createWindow[g_createWindowHead];
// THE WAIT THIS ROW PAYS IS PAID HERE (P12), so the metric has to see it HERE.
// Without this, by_op 2 counts only the fallback emissions and a WORKING window
// reads as "create stopped waiting" when the row had merely moved the waiting
// into this loop - the false green the design review named. Counted for the
// blocking take only: the poll is not a round trip, and it is the blocking take
// that is the thing MOBILEGL_IPC_CREATE_WINDOW divides (4,536 -> creates/window).
const Uint64 metricStart =
blocking ? Transport::LinkMetricsBeginReply(
true, static_cast<std::uint32_t>(MGPWireOp::ResourceCreate))
: 0;
const Transport::SessionWait wait = const Transport::SessionWait wait =
session.WaitForApplied(head.Seq, blocking ? 120000u : 0u); session.WaitForApplied(head.Seq, blocking ? 120000u : 0u);
if (blocking) Transport::LinkMetricsReplyApplied(metricStart);
if (wait != Transport::SessionWait::Reached) return; if (wait != Transport::SessionWait::Reached) return;
Int32 status = Wire::ReplySink::kStatusError; Int32 status = Wire::ReplySink::kStatusError;
Uint64 size = 0; Uint64 size = 0;
@@ -462,7 +503,21 @@ namespace MobileGL::MG_Remote::Client {
// match yet (or when the answer does not fit the scratch), and treating that as // match yet (or when the answer does not fit the scratch), and treating that as
// ERROR would invent a transport fault out of a reader that arrived early. The // ERROR would invent a transport fault out of a reader that arrived early. The
// entry stays in the window and is taken at the next drain. // entry stays in the window and is taken at the next drain.
if (!session.ReadReply(head.Seq, nullptr, 0, &status, &size)) return; if (!session.ReadReply(head.Seq, nullptr, 0, &status, &size)) {
// REACHED BUT UNREADABLE IS AN INVARIANT, NOT A RETRY (P12). The link declared
// it retains this answer, and on the stream arm the reply frame strictly
// precedes the progress frame that published appliedSeq - so by the time the
// wait above returns, the answer is in hand or something is broken. Retrying
// (what this used to do) wedges the window for the rest of the process and
// leaves every deferred object latched on a provisional accept; recovering by
// re-latching would lose texels. So it names itself instead.
SessionFail(MGFatalFamily::ReplyMissing,
"MGPipe: Fatal{ReplyMissing, \"create window\"} - seq %llu was "
"declared and APPLIED, and its answer is no longer in the link's "
"store; the window cannot advance past it and nothing recovers a "
"lost answer",
static_cast<unsigned long long>(head.Seq));
}
// ERROR IS NOT A DECLINE (M4 / R-5), and a deferred answer does not change that: // ERROR IS NOT A DECLINE (M4 / R-5), and a deferred answer does not change that:
// the same named Fatal the blocking take raises. // the same named Fatal the blocking take raises.
if (status == Wire::ReplySink::kStatusError) { if (status == Wire::ReplySink::kStatusError) {
@@ -480,6 +535,7 @@ namespace MobileGL::MG_Remote::Client {
} }
g_createWindowHead = (g_createWindowHead + 1) % kCreateWindowMax; g_createWindowHead = (g_createWindowHead + 1) % kCreateWindowMax;
--g_createWindowCount; --g_createWindowCount;
++g_createWindowTaken;
blocking = false; blocking = false;
} }
} }
@@ -507,10 +563,40 @@ namespace MobileGL::MG_Remote::Client {
if (status == 1) ++g_declined; if (status == 1) ++g_declined;
if (status == 0) ClearCreateSuspect(payload->Resource); if (status == 0) ClearCreateSuspect(payload->Resource);
} }
// ---- P12: WHY THERE IS NO RESIDENCY BUDGET HERE ANY MORE -------------------------------
//
// There was one, and it was measured: it counted the reply-owning records this client had
// emitted since the oldest window entry was pushed and took that entry back when the count
// approached the reply buffer's depth. On the device it fired on essentially EVERY create
// (budget=4,451 of 4,501 calls) and the drain still read nothing back (taken=63,
// readfail=8,872, by_op 2 = 9,071, wall 27.9 s). The clock was wrong, structurally:
//
// * the window only gets control WHEN A CREATE ARRIVES, and between two creates this
// client emits on the order of a thousand records - at the FIRST failed read the reply
// ring already spanned [1175..1504] while the head was seq 310;
// * what displaces a deferred answer is not what this client emits, it is WHAT THE
// SERVER ANSWERS, and the server is behind: its late answers to the earlier creates
// are what fills a bounded buffer first;
// * so the check fired too late by construction. Tightening it only removed the
// deferral entirely, which is what pushed=65 was.
//
// Retention replaced it, and retention is where the bound now lives: a link that declares
// RetainsReplies keeps an answer until its reader takes it (StreamLink's declared-answer
// store, whose capacity is tied to the window's own depth), and the window does not defer
// at all on a link that does not. That removes the only thing the budget was for.
// ReplyPostings() stays as a measurement.
void Wire_ResourceCreate(const MG_Pipe::MGPResourceDesc* payload, MG_Pipe::MGPReplySlot* reply) { void Wire_ResourceCreate(const MG_Pipe::MGPResourceDesc* payload, MG_Pipe::MGPReplySlot* reply) {
if (RunsAsTheServerRole()) { MG_Pipe::MGPipeMonolithScreen().ResourceCreate(payload, reply); return; } if (RunsAsTheServerRole()) { MG_Pipe::MGPipeMonolithScreen().ResourceCreate(payload, reply); return; }
ClientSession& session = RequireSession("ResourceCreate"); ClientSession& session = RequireSession("ResourceCreate");
const Uint32 window = CreateWindowEffective(); // THE WINDOW MAY ONLY DEFER WHERE THE LINK RETAINS ANSWERS (P12). On one that does
// not - the shared pool, whose slot is seq % slotCount and is reused - the answer the
// drain comes back for may already be gone, and there is NO recovery: retrying wedges
// the row for the rest of the process, and re-latching the object by sending another
// create wipes the server's record along with its PendingUploads (PipeApply.cpp:2033,
// PipeApply.h:332) while the client cleared its dirty flags at emission
// (PipeApply.h:298-304), so nobody re-sends those texels. So it takes the blocking
// path instead, which is the pre-window shape exactly.
const Uint32 window = session.LinkRetainsReplies() ? CreateWindowEffective() : 1u;
// THE WINDOW OFF RESTORES THE OLD SHAPE EXACTLY, and is the negative control for it. // THE WINDOW OFF RESTORES THE OLD SHAPE EXACTLY, and is the negative control for it.
// THE WINDOW OFF, THE SUSPECT LIST FULL, OR AN OBJECT THAT HAS ALREADY BEEN REFUSED: // THE WINDOW OFF, THE SUSPECT LIST FULL, OR AN OBJECT THAT HAS ALREADY BEEN REFUSED:
// all four take the blocking branch, which is the pre-window shape - and on the device // all four take the blocking branch, which is the pre-window shape - and on the device
@@ -518,6 +604,13 @@ namespace MobileGL::MG_Remote::Client {
// collected. See the section comment for the measurement and the arithmetic. // collected. See the section comment for the measurement and the arithmetic.
if (window <= 1 || g_createSuspects.size() >= kCreateSuspectMax || if (window <= 1 || g_createSuspects.size() >= kCreateSuspectMax ||
CreateIsSuspect(payload->Resource)) { CreateIsSuspect(payload->Resource)) {
// THE WINDOW RETIRES HERE, AND IT MAY BE HOLDING ANSWERS (P12). This branch is
// taken when the window is off, when the suspect list is full, or for a refused
// object - and in the last two cases entries already emitted are still in flight.
// Without this drain they arrive, are retained, and are never read, WHILE their
// objects stay latched on a provisional accept: the silent divergence the
// suspect list exists to prevent. One blocking pass settles them.
if (g_createWindowCount != 0) DrainCreateWindow(session, /*blockForOldest=*/true);
EmitCreateBlocking(session, payload, reply); EmitCreateBlocking(session, payload, reply);
return; return;
} }
@@ -540,9 +633,13 @@ namespace MobileGL::MG_Remote::Client {
} }
} }
Int32 status = Wire::ReplySink::kStatusError; Int32 status = Wire::ReplySink::kStatusError;
const Uint64 seq = // willReadReply IS TRUE AND THAT IS THE WHOLE POINT OF THE WINDOW: this record does
session.EmitAndWaitTails(MGPWireOp::ResourceCreate, payload, sizeof(*payload), nullptr, // not wait for its answer, and the drain above reads it later. A P12 no-reply bit
0, nullptr, 0, &status, nullptr, /*wantReply=*/false); // keyed on wantReply would tell the server to skip the very answer this row comes
// back for (docs/.../p12/CREATE-WINDOW-MEASURED.md section 7).
const Uint64 seq = session.EmitAndWaitTails(
MGPWireOp::ResourceCreate, payload, sizeof(*payload), nullptr, 0, nullptr, 0,
&status, nullptr, /*wantReply=*/false, /*willReadReply=*/true);
if (seq == Wire::kInvalidSeq) { if (seq == Wire::kInvalidSeq) {
// Cancelled: there is no ordinal to read an answer from, and the caller must NOT // Cancelled: there is no ordinal to read an answer from, and the caller must NOT
// latch an object the record never described. // latch an object the record never described.
@@ -590,7 +687,7 @@ namespace MobileGL::MG_Remote::Client {
if (confirmed) { if (confirmed) {
seq = session.EmitAndWaitTails(MGPWireOp::SetTextureParams, payload, sizeof(*payload), seq = session.EmitAndWaitTails(MGPWireOp::SetTextureParams, payload, sizeof(*payload),
nullptr, 0, nullptr, 0, &status, nullptr, nullptr, 0, nullptr, 0, &status, nullptr,
/*wantReply=*/false); /*wantReply=*/false, /*willReadReply=*/false);
status = seq == Wire::kInvalidSeq ? Wire::ReplySink::kStatusDeclined status = seq == Wire::kInvalidSeq ? Wire::ReplySink::kStatusDeclined
: Wire::ReplySink::kStatusOk; : Wire::ReplySink::kStatusOk;
} else { } else {
@@ -636,7 +733,13 @@ namespace MobileGL::MG_Remote::Client {
const Uint64 seq = session.EmitAndWaitTails( const Uint64 seq = session.EmitAndWaitTails(
MGPWireOp::ResourceSubData, &record, sizeof(record), MGPWireOp::ResourceSubData, &record, sizeof(record),
varTail != nullptr ? &tail : nullptr, varTail != nullptr ? 1u : 0u, nullptr, 0, varTail != nullptr ? &tail : nullptr, varTail != nullptr ? 1u : 0u, nullptr, 0,
&status, nullptr, wantReply); &status, nullptr, wantReply,
// ONE ANSWER TO BOTH QUESTIONS, and on this row that is not a shortcut: the
// wire arm's MGPipeSubDataWantsItsReply is false for the whole texture half
// (PipeRoute.h), the caller discards the Bool either way, and the record's own
// comment above already says "nothing reads it". A buffer-half caller that DID
// read it would pass wantReply=true and get its answer.
wantReply);
// Cancellation has no wire ordinal; retain the caller's nonzero local ticket. // Cancellation has no wire ordinal; retain the caller's nonzero local ticket.
if (seq != Wire::kInvalidSeq) reply->Id = seq; if (seq != Wire::kInvalidSeq) reply->Id = seq;
const Int32 postedStatus = (seq == Wire::kInvalidSeq || status == Wire::ReplySink::kStatusDeclined) const Int32 postedStatus = (seq == Wire::kInvalidSeq || status == Wire::ReplySink::kStatusDeclined)
@@ -720,7 +823,7 @@ namespace MobileGL::MG_Remote::Client {
if (!wantsReply) { if (!wantsReply) {
const Uint64 seq = session.EmitAndWaitTails( const Uint64 seq = session.EmitAndWaitTails(
MGPWireOp::ResourceRespecify, &record, sizeof(record), nullptr, 0, nullptr, 0, MGPWireOp::ResourceRespecify, &record, sizeof(record), nullptr, 0, nullptr, 0,
&status, nullptr, /*wantReply=*/false); &status, nullptr, /*wantReply=*/false, /*willReadReply=*/false);
status = seq == Wire::kInvalidSeq ? Wire::ReplySink::kStatusDeclined status = seq == Wire::kInvalidSeq ? Wire::ReplySink::kStatusDeclined
: Wire::ReplySink::kStatusOk; : Wire::ReplySink::kStatusOk;
} else { } else {
@@ -1161,6 +1264,14 @@ namespace MobileGL::MG_Remote::Client {
// against the effective ceiling and the array size, which are the two numbers the guard itself // against the effective ceiling and the array size, which are the two numbers the guard itself
// is written in terms of, and not against a literal repeated in the test. // is written in terms of, and not against a literal repeated in the test.
Uint32 ClientCreateWindowPending() { return g_createWindowCount; } Uint32 ClientCreateWindowPending() { return g_createWindowCount; }
// Taken + Pending is every create the window ever accepted: the answers it has read back and
// the ones still outstanding. A create the window accepted and then LOST would break that
// sum, which is the failure a provisional accept makes possible and a count cannot show.
Uint64 ClientCreateWindowTaken() { return g_createWindowTaken; }
// P12: RetainedOutstanding / SkippedUnwanted / UnansweredWanted live on the LINK, where the
// store is (StreamLink::RetainedOutstanding and friends). They are what says whether the
// declared-answer store is bounded by the CLIENT (SkippedUnwanted grows, outstanding does
// not) rather than by the server's answer rate - which is the property the capacity rests on.
Uint32 ClientCreateWindowEffective() { return CreateWindowEffective(); } Uint32 ClientCreateWindowEffective() { return CreateWindowEffective(); }
Uint32 ClientCreateWindowArraySize() { return kCreateWindowMax; } Uint32 ClientCreateWindowArraySize() { return kCreateWindowMax; }
// Objects whose create came back DECLINED: out of the window, next create blocking, and back // Objects whose create came back DECLINED: out of the window, next create blocking, and back
+5
View File
@@ -87,6 +87,11 @@ namespace MobileGL::MG_Remote::Client {
// clamped to the array), the array's own size, and the two tallies - objects whose create came // clamped to the array), the array's own size, and the two tallies - objects whose create came
// back DECLINED and are therefore out of the window, and how many refusals there have been. // back DECLINED and are therefore out of the window, and how many refusals there have been.
Uint32 ClientCreateWindowPending(); Uint32 ClientCreateWindowPending();
// How many deferred answers the window has read back. THE NUMBER THAT SAYS IT WORKED: a
// drain that never collects leaves Pending at the ceiling and every other reading unchanged,
// which is exactly what the device measured before the stream link learned to answer by seq.
Uint64 ClientCreateWindowTaken();
Uint32 ClientCreateWindowEffective(); Uint32 ClientCreateWindowEffective();
Uint32 ClientCreateWindowArraySize(); Uint32 ClientCreateWindowArraySize();
Uint32 ClientCreateWindowSuspects(); Uint32 ClientCreateWindowSuspects();
+16
View File
@@ -66,14 +66,30 @@ namespace MobileGL::MG_Remote::Server {
void ReplyPool::PostReply(Uint64 seq, Int32 status, const void* bytes, Uint64 size) { void ReplyPool::PostReply(Uint64 seq, Int32 status, const void* bytes, Uint64 size) {
if (m_link) { if (m_link) {
const auto result = m_link->PostReply(seq, status, bytes, size); const auto result = m_link->PostReply(seq, status, bytes, size);
if (result == MOBILEGL_OK) {
++m_posted;
return;
}
++m_failed;
if (result == MOBILEGL_ERR_BUFFER_TOO_SMALL) if (result == MOBILEGL_ERR_BUFFER_TOO_SMALL)
SessionFail(MGFatalFamily::ReplyTooLarge, "MGPipe: Fatal{ReplyTooLarge, stream reply}"); SessionFail(MGFatalFamily::ReplyTooLarge, "MGPipe: Fatal{ReplyTooLarge, stream reply}");
// EVERY OTHER FAILURE IS NAMED AND COUNTED RATHER THAN SWALLOWED (P12). This used to
// `return` on anything that was not BUFFER_TOO_SMALL, so a TRANSPORT_CLOSED reply
// vanished with no line, no counter and no Fatal - and the client's only symptom is a
// deferred answer that never arrives, which is indistinguishable from a buffer that
// overwrote it. Once per call site rather than once per reply: a broken link fails
// every time, and a log per answer would drown the run it is there to explain.
MGLOG_E_ONCE("MGPipe: reply seq %llu was NOT delivered (%d); the client will not read"
" this answer. FailedReplies() counts them",
static_cast<unsigned long long>(seq), static_cast<int>(result));
return; return;
} }
Transport::ReplySlotPool pool(m_base, m_size, m_slots); Transport::ReplySlotPool pool(m_base, m_size, m_slots);
// Fatal inside Post when the answer does not fit a slot: P5 does not chunk replies, // Fatal inside Post when the answer does not fit a slot: P5 does not chunk replies,
// and the client knows an answer's size before it emits the record. // and the client knows an answer's size before it emits the record.
pool.Post(seq, status, bytes, size); pool.Post(seq, status, bytes, size);
++m_posted;
} }
Uint32 ReplyPool::SlotBytes() const { return m_slotBytes; } Uint32 ReplyPool::SlotBytes() const { return m_slotBytes; }
+13
View File
@@ -97,12 +97,25 @@ namespace MobileGL::MG_Remote::Server {
// chosen from that and an overflow means the two sides disagree about the frame. // chosen from that and an overflow means the two sides disagree about the frame.
Uint32 SlotBytes() const; Uint32 SlotBytes() const;
// P12: DID THE ANSWER ACTUALLY GO OUT? PostedReplies counts the ones the link took,
// FailedReplies the ones it refused. THE PAIR EXISTS BECAUSE THE DECODER'S TALLY CANNOT
// ANSWER IT: m_answered is incremented BEFORE PostReply, so it counts ATTEMPTS. Without
// these two, a client that cannot read an answer has no way to tell "the server never
// sent it" from "it was sent and the bounded buffer dropped it" - and those two need
// opposite fixes, one in the transport and one in the deferral. (Found the hard way: a
// device run had the server report 4,521 answers and the client receive 4,501, and
// nothing in the tree could say which twenty were which.)
Uint64 PostedReplies() const { return m_posted; }
Uint64 FailedReplies() const { return m_failed; }
private: private:
Transport::ILink* m_link = nullptr; Transport::ILink* m_link = nullptr;
Uint8* m_base = nullptr; Uint8* m_base = nullptr;
Uint64 m_size = 0; Uint64 m_size = 0;
Uint32 m_slots = 0; Uint32 m_slots = 0;
Uint32 m_slotBytes = 0; Uint32 m_slotBytes = 0;
Uint64 m_posted = 0;
Uint64 m_failed = 0;
}; };
// ---- MGPClear's two discriminants --------------------------------------------------- // ---- MGPClear's two discriminants ---------------------------------------------------
+26
View File
@@ -199,6 +199,16 @@ namespace MobileGL::MG_Remote::Transport {
bool PublishIsDelivery = false; // false => Flush() is mandatory before any wait bool PublishIsDelivery = false; // false => Flush() is mandatory before any wait
std::uint64_t MaxRecordBytes = 0; std::uint64_t MaxRecordBytes = 0;
std::uint64_t MaxReplyBytes = 0; std::uint64_t MaxReplyBytes = 0;
// P12: DOES THIS LINK KEEP AN ANSWER UNTIL ITS READER TAKES IT? A stream does - the
// answers are the client's own bytes - and a shared pool does NOT: a slot is
// `seq % slotCount` and the next answer into it wins, so "the watermark passed this seq"
// says nothing about whether the answer is still there.
//
// IT IS A CAPABILITY RATHER THAN A HOPE because a row that DEFERS its answer (the create
// window) may only run where it is true: measured on the device, a deferral across the
// ~1,000 records between two creates lost its answer to a bounded buffer every time.
// A caller that sees false must take the blocking path instead.
bool RetainsReplies = false;
}; };
// Non-owning synchronization addresses, acquired once at attachment. They // Non-owning synchronization addresses, acquired once at attachment. They
@@ -285,6 +295,22 @@ namespace MobileGL::MG_Remote::Transport {
virtual MobileGLResult ReadReply(std::uint64_t seq, std::int32_t* outStatus, virtual MobileGLResult ReadReply(std::uint64_t seq, std::int32_t* outStatus,
const void** outPayload, std::uint64_t* outSize) = 0; const void** outPayload, std::uint64_t* outSize) = 0;
// P12: DECLARE THAT THIS SEQ'S ANSWER WILL BE READ, so that a link which can retain it
// does. Called by the producer side of the wire, in seq order, BEFORE the record is
// published - the answer cannot arrive before that, and the reader stores under the same
// mutex the declaration takes, so the hand-off needs no second synchronisation.
//
// WHY THE DECLARATION AND NOT "RETAIN EVERYTHING": a server that ignores the no-reply bit
// answers ~55,903 records in one frame where this client reads ~4,501, so retain-on-arrival
// grows ~11.3 entries per create and any cap is reached in C/11.3 creates - after which the
// eviction wave lands on precisely the oldest WANTED answer, which is the wedge this exists
// to avoid. Keyed on the declaration, the retained set is bounded by the CLIENT's own
// deferral depth instead of by the server's behaviour.
//
// A link with RetainsReplies false ignores it (the default), and its callers must not
// defer: see the capability's own note.
virtual void DeclareReplyRead(std::uint64_t seq) { (void)seq; }
// ---- the reverse channel -------------------------------------------- // ---- the reverse channel --------------------------------------------
virtual LinkArena* EventArena() = 0; virtual LinkArena* EventArena() = 0;
+11
View File
@@ -283,6 +283,17 @@ namespace MobileGL::MG_Remote::Transport {
kRecPad = 1u << 2, // filler to the wrap boundary, no payload meaning kRecPad = 1u << 2, // filler to the wrap boundary, no payload meaning
kRecBorrowSlot = 1u << 3, // slot is borrowed into the GPU timeline; retires late kRecBorrowSlot = 1u << 3, // slot is borrowed into the GPU timeline; retires late
kRecVarTail = 1u << 4, kRecVarTail = 1u << 4,
// P12: THE PEER NEED NOT ANSWER THIS RECORD. Set by the producer for a record whose
// answer NOBODY WILL EVER READ - not "whose caller is not waiting". The distinction is
// the whole point: the create window's records are emitted without a wait and their
// answers are read later by the drain, so they must NOT carry this bit.
//
// IT ALIASES kOptional (1<<5) IN THE CALL-FLAG SPACE, and that is harmless for the same
// reason the other five aliases are: the two spaces share one 16-bit field and are kept
// apart by the ENCODER'S TRANSLATION, never by stamping (PipeWireCodec.cpp's FlagSpace
// block names each pair and asserts them). kOptional is in kDropped - it never reaches
// this field - so nothing can set this bit by accident.
kRecNoReply = 1u << 5,
}; };
// Reserved kind for the wrap filler. The catalogue starts at 1. // Reserved kind for the wrap filler. The catalogue starts at 1.
+3 -1
View File
@@ -44,7 +44,9 @@ namespace MobileGL::MG_Remote::Transport {
} }
LinkCapabilities ShmLink::Capabilities() const { LinkCapabilities ShmLink::Capabilities() const {
const ReplySlotPool replies(m_memory.ReplyBase(), m_memory.ReplyBytes(), m_memory.ReplySlotCount()); const ReplySlotPool replies(m_memory.ReplyBase(), m_memory.ReplyBytes(), m_memory.ReplySlotCount());
return {true, true, true, m_memory.CmdRingCapacity() / 2, replies.MaxReplyBytes()}; // RetainsReplies stays false: a slot is seq % slotCount and the next answer into it wins.
return {true, true, true, m_memory.CmdRingCapacity() / 2, replies.MaxReplyBytes(),
/*RetainsReplies=*/false};
} }
LinkProgress* ShmLink::Progress() { LinkProgress* ShmLink::Progress() {
return m_memory.Valid() ? &m_memory.CmdControl()->Progress : nullptr; return m_memory.Valid() ? &m_memory.CmdControl()->Progress : nullptr;
+119 -24
View File
@@ -107,18 +107,52 @@ namespace MobileGL::MG_Remote::Transport {
// move (29.0 s against the 30.1 s of the same binary with the window off). The deferral // move (29.0 s against the 30.1 s of the same binary with the window off). The deferral
// was pure overhead: four answers held unread, plus one failed drain attempt per record. // was pure overhead: four answers held unread, plus one failed drain attempt per record.
// //
// BOUNDED AT kDefaultReplySlotCount, which is the pool ShmLink stands in for: an answer a // ---- AND THE RING WAS NOT ENOUGH, SO THE STORE IS KEYED ON A DECLARATION (P12) -------
// reader has not taken by the time eight newer ones have arrived is one the shm arm has //
// already overwritten too, so the two transports now lose the same answers and no more. // THE MEASUREMENT THAT SETTLED IT. With the ring at 8 the drain read back NOTHING:
// The byte vectors are sized per reply, so an idle link pays eight empty ones. // `taken=63 pushed=65 readfail=8,872` on a load frame, and the miss probe showed why -
static constexpr std::size_t kReplyRing = 8; // `want=310` on every miss while the ring had moved on to [1175..1504]. Between two
// creates this client emits on the order of a thousand records and looks at the window
// not once, so a deferral has to survive an unbounded amount of other traffic, and WHAT
// DISPLACES IT IS NOT WHAT THE CLIENT EMITS BUT WHAT THE SERVER ANSWERS - it is behind,
// and its late answers to the EARLIER creates fill a bounded buffer first.
//
// Ring 8 -> 1024 as a one-line experiment, and every deferred answer came back:
// `taken=4,499/4,500 readfail=0`, wall 27.9 s -> 23.0 s, and with the residency budget
// out of the way 28.66 s -> 16.80 s at window 2 and 11.45 s at window 4. So the property
// needed is "the answer is still there when the reader comes back", and 1024 is a
// STAND-IN for it, not the design: 1024 retained answers is ~2 GiB worst case, and "deep
// enough" is a probability rather than a bound.
//
// THE BOUND COMES FROM THE CLIENT. A seq is retained only if the wire DECLARED it will be
// read (ILink::DeclareReplyRead), so the outstanding set is the window's depth plus the
// one blocking row in flight plus whatever a retired window strands - it does not depend
// on how many answers the server chooses to send. Retaining on ARRIVAL instead would grow
// ~11.3 entries per create against a server that ignores the no-reply bit (55,903 answers
// a frame where this client reads 4,501), and any cap would then be reached and would
// evict precisely the oldest WANTED answer - the same wedge, a few hundred creates later.
//
// OVERFLOW IS FATAL AND NEVER AN EVICTION. An evicted wanted answer is unrecoverable:
// sending another create to re-latch the object wipes the server's record for it
// (PipeApply.cpp:2033) along with its PendingUploads (PipeApply.h:332), and the client
// cleared its dirty flags at EMISSION (PipeApply.h:298-304), so nobody re-sends those
// texels. The capacity is sized so that cannot be reached, and reaching it is a bug that
// says its own name.
static constexpr std::size_t kRetainedCap = 24;
struct StoredReply { struct StoredReply {
std::uint64_t seq = 0; std::uint64_t seq = 0;
std::int32_t status = 0; std::int32_t status = 0;
std::vector<std::uint8_t> bytes; std::vector<std::uint8_t> bytes;
}; };
std::array<StoredReply, kReplyRing> replies{}; // MONOTONE ON BOTH SIDES, so a cursor beats a hash map: the wire declares in emission
std::size_t replyNext = 0; // order, the server answers in apply order. It also makes a declared-but-never-answered
// seq visible for free - the cursor walks past it on the way to a later answer - which is
// counted rather than ignored, because the read that follows will fail and should fail
// with a number beside it.
std::vector<std::uint64_t> wanted;
std::size_t wantCursor = 0;
std::vector<StoredReply> retained;
std::uint64_t skippedUnwanted = 0, unansweredWanted = 0, retainedTotal = 0;
std::uint64_t lastProgressSeq = 0; std::uint64_t lastProgressSeq = 0;
std::chrono::steady_clock::time_point lastProgress = std::chrono::steady_clock::now(); std::chrono::steady_clock::time_point lastProgress = std::chrono::steady_clock::now();
LinkArena records{}, events{}; LinkArena records{}, events{};
@@ -334,15 +368,34 @@ namespace MobileGL::MG_Remote::Transport {
std::lock_guard<std::mutex> lock(replyMutex); std::lock_guard<std::mutex> lock(replyMutex);
if (a <= replySeq) Corrupt("reply sequence moved backwards"); if (a <= replySeq) Corrupt("reply sequence moved backwards");
replySeq = a; replySeq = a;
// RING, NOT REPLACE. replySeq stays the newest and stays monotone - // DECLARED? The cursor walks past any DECLARED seq this answer has
// the wait predicate below is written in terms of it - while the // overtaken: the server answers in apply order, so an answer with a
// answers themselves are kept for the readers that come back for an // higher seq means those will never come. That is a broken invariant
// older one (the window's drain, StreamLink.cpp's own note). // rather than a race, and it is counted - the read that follows fails
StoredReply& slot = replies[replyNext]; // and should fail with this number beside it.
replyNext = (replyNext + 1) % kReplyRing; while (wantCursor < wanted.size() && wanted[wantCursor] < a) {
slot.seq = a; ++wantCursor;
slot.status = static_cast<std::int32_t>(static_cast<std::uint32_t>(b)); ++unansweredWanted;
slot.bytes.assign(payload, payload + size); }
if (wantCursor < wanted.size() && wanted[wantCursor] == a) {
++wantCursor;
// OVERFLOW IS NAMED, NOT ABSORBED. See the capacity note above:
// an eviction here would throw away an answer somebody is waiting
// for, and there is no path that recovers one.
if (retained.size() >= kRetainedCap) {
Corrupt("the declared-answer store overflowed; a declared answer"
" would have to be evicted and none is recoverable");
}
StoredReply& slot = retained.emplace_back();
slot.seq = a;
slot.status = static_cast<std::int32_t>(static_cast<std::uint32_t>(b));
slot.bytes.assign(payload, payload + size);
++retainedTotal;
} else {
// NOBODY DECLARED IT: drop it. This is what keeps the store bounded
// against a server that answers records this client never reads.
++skippedUnwanted;
}
} }
replyReady.notify_all(); replyReady.notify_all();
producer.Notify(); producer.Notify();
@@ -464,7 +517,8 @@ namespace MobileGL::MG_Remote::Transport {
} }
LinkCapabilities StreamLink::Capabilities() const { LinkCapabilities StreamLink::Capabilities() const {
if (!m_impl->memory) return {}; if (!m_impl->memory) return {};
return {false, false, false, m_impl->memory->CmdRingCapacity() / 2, m_impl->MaxReply()}; return {false, false, false, m_impl->memory->CmdRingCapacity() / 2, m_impl->MaxReply(),
/*RetainsReplies=*/true};
} }
LinkProgress* StreamLink::Progress() { LinkProgress* StreamLink::Progress() {
return m_impl->memory ? &m_impl->C().Progress : nullptr; return m_impl->memory ? &m_impl->C().Progress : nullptr;
@@ -589,17 +643,22 @@ namespace MobileGL::MG_Remote::Transport {
return x.closed.load(std::memory_order_acquire) || x.replySeq >= seq || return x.closed.load(std::memory_order_acquire) || x.replySeq >= seq ||
x.C().Progress.appliedSeq.load(std::memory_order_acquire) >= seq; x.C().Progress.appliedSeq.load(std::memory_order_acquire) >= seq;
}); });
// BY SEQ, WHICH IS WHAT THE PARAMETER HAS ALWAYS SAID (P12). The equality this replaces // BY SEQ, WHICH IS WHAT THE PARAMETER HAS ALWAYS SAID (P12). The equality this replaced
// was true only while every caller read the newest answer; it is what made a deferred // was true only while every caller read the newest answer; it is what made a deferred
// answer unreadable and the create window inert on this transport. // answer unreadable and the create window inert on this transport.
for (const auto& slot : x.replies) { for (auto it = x.retained.begin(); it != x.retained.end(); ++it) {
if (slot.seq != seq) continue; if (it->seq != seq) continue;
// Copied into the shared scratch so the pointer outlives the lock, exactly as the // TAKE-AND-DELETE IS ONE STEP UNDER THE LOCK. The bytes are SWAPPED into the shared
// single-slot version did: the caller memcpys under its own frame. // scratch before the entry goes, so whoever is handed the answer is whoever consumed
x.readReply = slot.bytes; // it - no copy of a large answer, and no window in which a second reader could see
*status = slot.status; // the same seq. (The pointer outlives the lock, as it always has here; this link has
// ONE reply reader, and the store's erase is what keeps that an invariant rather
// than a hope.)
x.readReply.swap(it->bytes);
*status = it->status;
*size = x.readReply.size(); *size = x.readReply.size();
*p = x.readReply.data(); *p = x.readReply.data();
x.retained.erase(it);
return MOBILEGL_OK; return MOBILEGL_OK;
} }
return x.closed.load() ? MOBILEGL_ERR_TRANSPORT_CLOSED : MOBILEGL_ERR_PROTOCOL_MISMATCH; return x.closed.load() ? MOBILEGL_ERR_TRANSPORT_CLOSED : MOBILEGL_ERR_PROTOCOL_MISMATCH;
@@ -624,12 +683,48 @@ namespace MobileGL::MG_Remote::Transport {
TransportRoleTag StreamLink::Role() const { TransportRoleTag StreamLink::Role() const {
return m_impl->role; return m_impl->role;
} }
void StreamLink::DeclareReplyRead(std::uint64_t seq) {
auto& x = *m_impl;
if (!x.Client() || !x.memory) return;
std::lock_guard<std::mutex> lock(x.replyMutex);
// MONOTONE, IN EMISSION ORDER (the wire declares before it publishes, and seqs only ever
// grow). An out-of-order or repeated declaration is dropped rather than stored: the first
// would break the cursor, and the second is a retry that must not grow the list.
if (!x.wanted.empty() && seq <= x.wanted.back()) return;
x.wanted.push_back(seq);
// AND THE CONSUMED PREFIX IS RELEASED, or the list would grow by one entry per declared
// record for the life of the session (4,536 a frame). The cursor's entries can never be
// needed again: a seq is answered once.
if (x.wantCursor >= 64) {
x.wanted.erase(x.wanted.begin(),
x.wanted.begin() + static_cast<std::ptrdiff_t>(x.wantCursor));
x.wantCursor = 0;
}
}
std::uint64_t StreamLink::RetainedOutstanding() const {
auto& x = *m_impl;
std::lock_guard<std::mutex> lock(x.replyMutex);
return static_cast<std::uint64_t>(x.retained.size());
}
std::uint64_t StreamLink::RetainedTotal() const { return m_impl->retainedTotal; }
std::uint64_t StreamLink::SkippedUnwanted() const { return m_impl->skippedUnwanted; }
std::uint64_t StreamLink::UnansweredWanted() const { return m_impl->unansweredWanted; }
void StreamLink::Detach() { void StreamLink::Detach() {
auto& x = *m_impl; auto& x = *m_impl;
if (!x.memory) return; if (!x.memory) return;
x.stopping.store(true, std::memory_order_release); x.stopping.store(true, std::memory_order_release);
x.Die(false); x.Die(false);
if (x.reader.joinable()) x.reader.join(); if (x.reader.joinable()) x.reader.join();
// P12: the declared-answer store does not outlive the link. Without this a detached
// session leaves up to a frame's worth of answers (and their seqs) resident.
{
std::lock_guard<std::mutex> lock(x.replyMutex);
x.wanted.clear();
x.wantCursor = 0;
x.retained.clear();
}
#if !defined(_WIN32) #if !defined(_WIN32)
if (x.fd >= 0) ::close(x.fd); if (x.fd >= 0) ::close(x.fd);
#endif #endif
+11
View File
@@ -36,6 +36,17 @@ namespace MobileGL::MG_Remote::Transport {
MobileGLResult ResolveSpan(LinkSegment, LinkSpan, const void**) override; MobileGLResult ResolveSpan(LinkSegment, LinkSpan, const void**) override;
MobileGLResult PostReply(std::uint64_t, std::int32_t, const void*, std::uint64_t) override; MobileGLResult PostReply(std::uint64_t, std::int32_t, const void*, std::uint64_t) override;
MobileGLResult ReadReply(std::uint64_t, std::int32_t*, const void**, std::uint64_t*) override; MobileGLResult ReadReply(std::uint64_t, std::int32_t*, const void**, std::uint64_t*) override;
void DeclareReplyRead(std::uint64_t) override;
// P12 diagnostics for the declared-answer store. RetainedOutstanding is what the capacity
// is about (it must stay near the window's depth, not grow with the server's answers);
// RetainedTotal counts the answers kept for their readers; SkippedUnwanted counts the ones
// nobody declared, which is the number that proves the store is bounded by the CLIENT and
// not by the server; UnansweredWanted counts declared seqs the server never answered.
std::uint64_t RetainedOutstanding() const;
std::uint64_t RetainedTotal() const;
std::uint64_t SkippedUnwanted() const;
std::uint64_t UnansweredWanted() const;
LinkArena* EventArena() override; LinkArena* EventArena() override;
LinkCursor* EventCursor() override; LinkCursor* EventCursor() override;
std::uint64_t EventPublishedHead() const override; std::uint64_t EventPublishedHead() const override;
+43 -8
View File
@@ -88,7 +88,8 @@ namespace MobileGL::MG_Remote::Wire {
static_cast<Uint16>(Transport::kRecHasBlob) | static_cast<Uint16>(Transport::kRecHasBlob) |
static_cast<Uint16>(Transport::kRecPad) | static_cast<Uint16>(Transport::kRecPad) |
static_cast<Uint16>(Transport::kRecBorrowSlot) | static_cast<Uint16>(Transport::kRecBorrowSlot) |
static_cast<Uint16>(Transport::kRecVarTail); static_cast<Uint16>(Transport::kRecVarTail) |
static_cast<Uint16>(Transport::kRecNoReply);
// The three call flags the encoder TRANSLATES, and the three it deliberately drops // The three call flags the encoder TRANSLATES, and the three it deliberately drops
// because MGPipeCallFlagsFor(op) recovers them from the opcode. // because MGPipeCallFlagsFor(op) recovers them from the opcode.
constexpr Uint16 kTranslated = static_cast<Uint16>(MG_Pipe::kNeedsAck) | constexpr Uint16 kTranslated = static_cast<Uint16>(MG_Pipe::kNeedsAck) |
@@ -103,7 +104,7 @@ namespace MobileGL::MG_Remote::Wire {
"MGPipeCallFlags gained or lost an enumerator; re-derive the translation in " "MGPipeCallFlags gained or lost an enumerator; re-derive the translation in "
"EncodeRecord and extend the overlap assertions below before assuming the " "EncodeRecord and extend the overlap assertions below before assuming the "
"new bit is safe to drop"); "new bit is safe to drop");
static_assert(FlagSpace::kRingAll == 0x1Fu, static_assert(FlagSpace::kRingAll == 0x3Fu,
"RingRecordFlags gained or lost an enumerator; the two spaces share one " "RingRecordFlags gained or lost an enumerator; the two spaces share one "
"16-bit field, so a new ring bit may now alias a call flag"); "16-bit field, so a new ring bit may now alias a call flag");
static_assert((FlagSpace::kTranslated | FlagSpace::kDropped) == FlagSpace::kCallAll && static_assert((FlagSpace::kTranslated | FlagSpace::kDropped) == FlagSpace::kCallAll &&
@@ -111,8 +112,13 @@ namespace MobileGL::MG_Remote::Wire {
"every MGPipeCallFlags bit must be either translated or deliberately " "every MGPipeCallFlags bit must be either translated or deliberately "
"dropped; a seventh enumerator that needs a ring bit would otherwise be " "dropped; a seventh enumerator that needs a ring bit would otherwise be "
"dropped in silence"); "dropped in silence");
// FIVE OF THE SIX CALL-FLAG BITS ALIAS A RING BIT. Only kOptional (1<<5) is free, and it // ALL SIX CALL-FLAG BITS NOW ALIAS A RING BIT. The sixth, kOptional, was free "by luck
// is free by luck rather than by design - RingRecordFlags simply has not reached 1<<5 yet. // rather than by design" (RingRecordFlags had not reached 1<<5) until P12 gave bit 5 a
// meaning of its own, kRecNoReply. The alias is harmless for the usual reason - kOptional is
// in kDropped, so it is never stamped into this field, and kRecNoReply is only ever set by
// the encoder's translation - and the named assert below is where that is stated rather than
// assumed. What it costs is the WARNING this comment used to carry: there is no spare bit
// left, so the next call flag or ring flag needs a wider field, not another enumerator.
static_assert((FlagSpace::kCallAll & FlagSpace::kRingAll) == FlagSpace::kRingAll, static_assert((FlagSpace::kCallAll & FlagSpace::kRingAll) == FlagSpace::kRingAll,
"the overlap between the two flag spaces moved"); "the overlap between the two flag spaces moved");
// Named individually so a failure says WHICH pair, and so the three that actually bite are // Named individually so a failure says WHICH pair, and so the three that actually bite are
@@ -140,9 +146,14 @@ namespace MobileGL::MG_Remote::Wire {
"stamps kRecVarTail on nine opcodes, and a reader who believes " "stamps kRecVarTail on nine opcodes, and a reader who believes "
"PipeWire.inc's 'MGPipeCallFlags of the call' comment reads those nine as " "PipeWire.inc's 'MGPipeCallFlags of the call' comment reads those nine as "
"kReplySlot"); "kReplySlot");
static_assert((static_cast<Uint16>(MG_Pipe::kOptional) & FlagSpace::kRingAll) == 0, static_assert(static_cast<Uint16>(MG_Pipe::kOptional) ==
"kOptional is the one call flag with no ring alias, and only because " static_cast<Uint16>(Transport::kRecNoReply),
"RingRecordFlags has not reached 1<<5"); "kOptional == kRecNoReply - the alias P12 created. Harmless because kOptional "
"is in kDropped (never stamped) and kRecNoReply is only ever set by the "
"encoder: a reader that saw a stamped kOptional would read \"do not answer\" off "
"a flag that means \"this call may be absent from the backend table\". If this "
"pair ever stops being true, keep translating anyway - the hazard is two flag "
"spaces in one field, not this particular overlap");
// ---- and the two headers really are one layout ----------------------------------- // ---- and the two headers really are one layout -----------------------------------
// //
@@ -1059,7 +1070,7 @@ namespace MobileGL::MG_Remote::Wire {
} }
Uint64 PipeWireEncoder::EncodeRecord(MGPWireOp op, const void* payload, Uint64 payloadBytes, Uint64 PipeWireEncoder::EncodeRecord(MGPWireOp op, const void* payload, Uint64 payloadBytes,
const WireTail* tails, Uint32 tailCount) { const WireTail* tails, Uint32 tailCount, Bool noReply) {
if (Cancelled()) return kInvalidSeq; if (Cancelled()) return kInvalidSeq;
if (!Valid()) { if (!Valid()) {
WireProtocolFatal("PipeWireEncoder::EncodeRecord", "no SEG_CMD producer installed"); WireProtocolFatal("PipeWireEncoder::EncodeRecord", "no SEG_CMD producer installed");
@@ -1127,6 +1138,10 @@ namespace MobileGL::MG_Remote::Wire {
if ((callFlags & static_cast<Uint32>(kNeedsAck)) != 0) ringFlags |= Transport::kRecNeedsAck; if ((callFlags & static_cast<Uint32>(kNeedsAck)) != 0) ringFlags |= Transport::kRecNeedsAck;
if ((callFlags & static_cast<Uint32>(kHasBlob)) != 0) ringFlags |= Transport::kRecHasBlob; if ((callFlags & static_cast<Uint32>(kHasBlob)) != 0) ringFlags |= Transport::kRecHasBlob;
if ((callFlags & static_cast<Uint32>(kVarTail)) != 0) ringFlags |= Transport::kRecVarTail; if ((callFlags & static_cast<Uint32>(kVarTail)) != 0) ringFlags |= Transport::kRecVarTail;
// P12: THE ONE BIT THAT IS NOT A TRANSLATION OF THE OPCODE, because it is not a property
// of the row - set_texture_params waits for an unconfirmed object and does not for a
// confirmed one, so the same opcode answers both ways and only the client knows which.
if (noReply) ringFlags |= Transport::kRecNoReply;
// BOTH WRAP READINGS ARE TAKEN FROM THE PRODUCER'S OWN CURSOR, not from a flag Reserve // BOTH WRAP READINGS ARE TAKEN FROM THE PRODUCER'S OWN CURSOR, not from a flag Reserve
// does not return. The cursor is a monotonic byte count and the ring is indexed // does not return. The cursor is a monotonic byte count and the ring is indexed
@@ -1452,6 +1467,8 @@ namespace MobileGL::MG_Remote::Wire {
Uint64 PipeWireDecoder::AcceptedRecords() const { return m_accepted; } Uint64 PipeWireDecoder::AcceptedRecords() const { return m_accepted; }
Uint64 PipeWireDecoder::DeclinedRecords() const { return m_declined; } Uint64 PipeWireDecoder::DeclinedRecords() const { return m_declined; }
Uint64 PipeWireDecoder::AnsweredRecords() const { return m_answered; }
Uint64 PipeWireDecoder::SkippedAnswers() const { return m_skipped; }
void PipeWireDecoder::PostReply(MGPWireOp op, Uint64 seq, Int32 status, const void* bytes, void PipeWireDecoder::PostReply(MGPWireOp op, Uint64 seq, Int32 status, const void* bytes,
Uint64 size) { Uint64 size) {
@@ -1723,6 +1740,14 @@ namespace MobileGL::MG_Remote::Wire {
// four lines inside one lambda, made under R-17 by c1 because it is the server half of // four lines inside one lambda, made under R-17 by c1 because it is the server half of
// the routing R-17 assigns, and it is called out in c1-v2.md so the integrator can // the routing R-17 assigns, and it is called out in c1-v2.md so the integrator can
// move it if the call belongs elsewhere. // move it if the call belongs elsewhere.
// P12: MAY THIS RECORD'S ANSWER BE SKIPPED? Read from the RING FRAMING field, not from
// MGPipeCallFlagsFor(op): the client decides per CALL, and the opcode cannot answer for
// it (set_texture_params waits for an unconfirmed object and does not for a confirmed
// one). MGPWireRecHeader and RingRecordHeader are the same eight bytes, so `record` -
// which is the header, with the payload behind it - is where the producer's bit is.
const Bool answerSkipped =
(static_cast<const MGPWireRecHeader*>(record)->Flags &
static_cast<Uint16>(Transport::kRecNoReply)) != 0;
const auto noteAcceptance = [&](Bool accepted) { const auto noteAcceptance = [&](Bool accepted) {
m_lastAcceptanceKnown = true; m_lastAcceptanceKnown = true;
m_lastAcceptance = accepted; m_lastAcceptance = accepted;
@@ -1731,6 +1756,16 @@ namespace MobileGL::MG_Remote::Wire {
} else { } else {
++m_declined; ++m_declined;
} }
// THE BOOKKEEPING ABOVE IS NOT CONDITIONAL, and the skip is placed BELOW it rather
// than around it on purpose: m_accepted / m_declined / LastAcceptance are the
// acceptance record (MG_Test asserts on them), while the PostReply below is the WIRE
// cost this bit exists to remove. A row whose answer is skipped still has to say what
// it decided - "nobody reads the answer" is not "nothing happened".
if (answerSkipped) {
++m_skipped;
return;
}
++m_answered;
// DECLINED is a real answer and carries no payload (ReplySlot.h): the four Bool // DECLINED is a real answer and carries no payload (ReplySlot.h): the four Bool
// rows say `false` with it, exactly as MapPersistent says nullptr with it. // rows say `false` with it, exactly as MapPersistent says nullptr with it.
PostReply(op, seq, accepted ? ReplySink::kStatusOk : ReplySink::kStatusDeclined, PostReply(op, seq, accepted ? ReplySink::kStatusOk : ReplySink::kStatusDeclined,
+20 -1
View File
@@ -274,7 +274,16 @@ namespace MobileGL::MG_Remote::Wire {
// can only report a corrupt stream. That is the same arithmetic the decoder runs, so // can only report a corrupt stream. That is the same arithmetic the decoder runs, so
// the check is real rather than a restatement of the caller's own belief. // the check is real rather than a restatement of the caller's own belief.
Uint64 EncodeRecord(MG_Pipe::MGPWireOp op, const void* payload, Uint64 payloadBytes, Uint64 EncodeRecord(MG_Pipe::MGPWireOp op, const void* payload, Uint64 payloadBytes,
const WireTail* tails, Uint32 tailCount); const WireTail* tails, Uint32 tailCount, Bool noReply = false);
// `noReply` (P12) stamps Transport::kRecNoReply, which tells the server it may SKIP the
// answer for this record. IT IS NOT "the caller is not waiting" - that is `wantReply` on
// ClientSession::EmitAndWaitTails, and the two are deliberately different questions: the
// create window emits without waiting and READS the answer later, so its records must not
// carry this. Only a record whose answer nobody will ever read may set it, and the client
// is where that is known - the server cannot recover it from the opcode, because the same
// row answers both ways (set_texture_params waits for an unconfirmed object and does not
// for a confirmed one).
// Releases every SEG_STAGE run named by a record the apply side has RETIRED // Releases every SEG_STAGE run named by a record the apply side has RETIRED
// (RingControl::retiredSeq, R-9, which this class only ever READS). Called from // (RingControl::retiredSeq, R-9, which this class only ever READS). Called from
@@ -739,6 +748,14 @@ namespace MobileGL::MG_Remote::Wire {
Bool LastAcceptance() const; Bool LastAcceptance() const;
Uint64 AcceptedRecords() const; Uint64 AcceptedRecords() const;
Uint64 DeclinedRecords() const; Uint64 DeclinedRecords() const;
// P12: HOW MANY ANSWERS WERE WRITTEN AND HOW MANY WERE SKIPPED, counted where the
// decision is made. This is the pair a deferral's viability is read off: only the
// ANSWERED records compete for the reply pool, so `AnsweredRecords() / creates` is how
// many replies stand between two deferred answers. Without it the client can see that
// its drain failed but not whether the server was ever told it could stop answering -
// and a wire change whose effect is invisible is a wire change nobody can debug.
Uint64 AnsweredRecords() const;
Uint64 SkippedAnswers() const;
// Points MG_Pipe::gMGPipeWireRecordApply at this layer's thunk. Called once from the // Points MG_Pipe::gMGPipeWireRecordApply at this layer's thunk. Called once from the
// constructor and modelled on SegmentTable::InstallProcessResolver, which is the same // constructor and modelled on SegmentTable::InstallProcessResolver, which is the same
@@ -772,6 +789,8 @@ namespace MobileGL::MG_Remote::Wire {
Bool m_lastAcceptance = false; Bool m_lastAcceptance = false;
Uint64 m_accepted = 0; Uint64 m_accepted = 0;
Uint64 m_declined = 0; Uint64 m_declined = 0;
Uint64 m_answered = 0;
Uint64 m_skipped = 0;
// The SEG_STAGE runs the record being applied resolved, for the 0xDD fill. Eight deep // The SEG_STAGE runs the record being applied resolved, for the 0xDD fill. Eight deep
// so CreateShaderState's seven blob members plus a tail would fit if a later phase // so CreateShaderState's seven blob members plus a tail would fit if a later phase
// declares them; today at most one run is ever noted (see PoisonedStageBytes). // declares them; today at most one run is ever noted (see PoisonedStageBytes).
@@ -949,6 +949,84 @@ TEST_F(PipeWireCodecTest, ResourceSubDataCarriesABlobAndARegionTailTogether) {
EXPECT_EQ(std::memcmp(staged, texels.data(), texels.size()), 0); EXPECT_EQ(std::memcmp(staged, texels.data(), texels.size()), 0);
} }
// =====================================================================================
// P12: THE NO-REPLY BIT - THE ANSWER IS SKIPPED, THE ACCEPTANCE RECORD IS NOT
// =====================================================================================
//
// MOBILEGL_IPC_CREATE_WINDOW's deferral cannot be collected while 8 reply slots stand in front of
// 55,903 replies in one load frame, so a producer can now say that a record's answer will never
// be read (Transport::kRecNoReply, and ClientSession's `willReadReply`, which is NOT `wantReply`:
// the window's records are emitted without waiting and their answers ARE read, by the drain).
//
// TWO THINGS HAVE TO HOLD AND THEY PULL IN OPPOSITE DIRECTIONS: the reply must NOT be written, and
// the acceptance record must be written ANYWAY - "nobody reads the answer" is not "nothing
// happened", and the decoder's tally is what MG_Test asserts the acceptance semantics on.
//
// ExpectRepliesAgreeWithTheAcceptanceTally is deliberately NOT called here: its invariant (the
// slots and the tally agree) is about records that ASK for answers, and this case exists to show
// that the bit is the one thing that separates them.
TEST_F(PipeWireCodecTest, TheNoReplyBitSkipsTheAnswerAndKeepsTheAcceptanceRecord) {
Wire2 wire;
MGPResourceDesc create{};
create.Resource = MakeHandle(62);
create.Target = static_cast<Uint8>(MGPipeResourceTarget::Tex2D);
create.InternalFormat = 1;
create.Width = 4;
create.Height = 4;
create.Depth = 1;
create.ArrayLayers = 1;
create.Levels = 1;
create.Samples = 1;
// ---- THE NEGATIVE CONTROL FIRST: WITHOUT THE BIT NOTHING CHANGES ----
// The bit is OPT-IN. A case that only checked the skip would pass against a server that
// stopped answering everything, which is a different and much worse change.
ASSERT_NE(wire.Encoder().EncodeRecord(MGPWireOp::ResourceCreate, &create, sizeof(create)),
kInvalidSeq);
bool applied = false;
ASSERT_TRUE(wire.PumpOne(&applied));
ASSERT_EQ(wire.Answers().All.size(), 1u)
<< "a reply-owning record that did not ask to be skipped was not answered";
EXPECT_EQ(wire.Answers().All[0].Seq, 1u);
// ---- AND WITH IT: NO ANSWER, AND THE SAME ACCEPTANCE RECORD ----
// THE SAME OPCODE, deliberately: the client decides this per CALL (set_texture_params waits
// for an unconfirmed object and does not for a confirmed one), so a reader that recovered
// "skip" from the opcode alone would get the first record right and this one wrong.
ASSERT_NE(wire.Encoder().EncodeRecord(MGPWireOp::ResourceCreate, &create, sizeof(create),
nullptr, 0, /*noReply=*/true),
kInvalidSeq);
ASSERT_TRUE(wire.PumpOne(&applied));
EXPECT_EQ(wire.Answers().All.size(), 1u)
<< "the bit was set and an answer was written anyway - the 55,903-reply budget the bit "
"exists to cut did not move";
// THE HALF THAT MUST NOT BE SKIPPED WITH IT. Two records were applied and both were decided:
// the belt that declines them (no P4a consumer in this process) ran for the second one too,
// and LastAcceptance is the value the applier's own monolith-side assertions read.
EXPECT_EQ(wire.Decoder().AcceptedRecords() + wire.Decoder().DeclinedRecords(), 2u)
<< "the acceptance record was skipped along with the answer";
EXPECT_TRUE(wire.Decoder().LastAcceptanceKnown())
<< "a skipped answer left the acceptance unknown, so the record was not decided at all";
EXPECT_FALSE(wire.Decoder().LastAcceptance());
// AND THE SERVER'S OWN SPLIT, which is the pair a deferral's viability is read off: only the
// ANSWERED records compete for the reply pool. A client that cannot see this number can tell
// that its drain failed but not whether the server was ever told it could stop answering -
// which is the question a device run of the window turned out to need an answer to.
EXPECT_EQ(wire.Decoder().AnsweredRecords(), 1u);
EXPECT_EQ(wire.Decoder().SkippedAnswers(), 1u);
// ---- AND THE BIT IS IN THE RING'S FIELD, NOT THE CALL'S ----
// The record crossed the ring with the flag the producer stamped; RingTest owns the flag
// spaces themselves (all six call bits now alias a ring bit), so what is pinned HERE is that
// this row's encoded flags carry it rather than a call flag that would be recovered on the
// far side as something else entirely.
EXPECT_EQ(MGPipeCallFlagsFor(MGPWireOp::ResourceCreate) &
static_cast<Uint32>(MG_Pipe::kOptional),
0u)
<< "ResourceCreate grew kOptional, whose ring alias is kRecNoReply: a stamped call flag "
"would now read as 'do not answer me'";
}
TEST_F(PipeWireCodecTest, SetGlobalConstantsCarriesTheDefaultUniformBlock) { TEST_F(PipeWireCodecTest, SetGlobalConstantsCarriesTheDefaultUniformBlock) {
Wire2 wire; Wire2 wire;
std::vector<std::uint8_t> block(256, 0x11); std::vector<std::uint8_t> block(256, 0x11);
+51 -57
View File
@@ -1205,21 +1205,22 @@ TEST(RemoteClientControls, ABufferRespecifyTakesNoReplyWhileATextureOneStillDoes
// answers are collected in order. A late DECLINED un-latches its object, which puts every later row // answers are collected in order. A late DECLINED un-latches its object, which puts every later row
// for that object back on the blocking path - the repair that already existed, not a new one. // for that object back on the blocking path - the repair that already existed, not a new one.
// //
// THE THREE WAYS THIS CAN GO WRONG, one reading each: // ⚠️ THIS CASE RUNS ON THE IN-PROCESS ARM, WHICH IS ShmLink, AND SINCE P12 THAT MEANS THE WINDOW
// IS OFF HERE BY DESIGN - `CreateWindowEffective()` is gated on LinkRetainsReplies() precisely
// because a shared pool's slot is `seq % slotCount` and is reused, so a deferred answer may be
// gone with no way to recover it. What this case pins is therefore THAT GATE, and it is the
// assertion the device cannot make: set the knob as high as it goes and the row must STILL take the
// blocking path on a link that cannot retain.
// //
// 1. THE WINDOW DEFERS NOTHING (the row pays a wait per record and the change is decoration) - // THE WINDOW'S OWN BEHAVIOUR IS PINNED ELSEWHERE, ON THE ARM IT SHIPS ON: StreamLinkTest's
// the ON half below; // declared-answer cases for the store, and the stream-arm window case for the row. That split is
// 2. THE WINDOW IS NOT WHAT DECIDES (the row defers while the operator asked it not to, which is // not tidiness - three rounds of this feature were green here while being inert on the device,
// the same defect as 1 with the sign flipped) - THE NEGATIVE CONTROL, run in the SAME CHILD as // because these gates and the device run on different transports.
// the ON half so that both readings share a session, a server, a set of objects and a pair of //
// counters. MOBILEGL_IPC_CREATE_WINDOW=1 must restore the pre-window shape exactly; this is // WHAT IS STILL READ HERE, because it is transport-independent: the environment cannot raise the
// the assertion that goes red if the window ever stops being the knob; // window past the array, the array cannot exceed half the reply pool, and the invariant holds after
// 3. THE WINDOW HOLDS MORE THAN IT IS SIZED FOR - and the ring is what makes this one quiet: an // every create.
// unguarded push does not grow a count past its ceiling, it REPLACES the oldest confirmation TEST(RemoteClientControls, TheWindowRefusesToDeferOnALinkThatCannotRetainAnswers) {
// and leaves the count exactly where it was. So the invariant is read against the effective
// ceiling after every create, the ceiling is read against the array, the array is read against
// the reply pool it shares, and the environment is not allowed to raise any of them.
TEST(RemoteClientControls, ACreateWindowDefersTheAnswersAndTheWindowOffDoesNot) {
const auto child = RunInChild([] { const auto child = RunInChild([] {
::setenv("MOBILEGL_PIPE_STATS", "1", 1); ::setenv("MOBILEGL_PIPE_STATS", "1", 1);
CapsPeer backend; CapsPeer backend;
@@ -1266,45 +1267,30 @@ TEST(RemoteClientControls, ACreateWindowDefersTheAnswersAndTheWindowOffDoesNot)
} }
}; };
// ---- THE WINDOW ON: twelve creates, strictly fewer waits ---- // ---- THE KNOB IS AS HIGH AS IT GOES, AND THE ROW MUST STILL BLOCK ----
MG_Config::Ipc.CreateWindow = 4;
const Uint64 recordsBefore = Transport::LinkMetricsRecordsFor(createOp); const Uint64 recordsBefore = Transport::LinkMetricsRecordsFor(createOp);
const Uint64 waitsBefore = Transport::LinkMetricsReplyWaitsFor(createOp); const Uint64 waitsBefore = Transport::LinkMetricsReplyWaitsFor(createOp);
burst(12); burst(12);
const Uint64 records = Transport::LinkMetricsRecordsFor(createOp) - recordsBefore; const Uint64 records = Transport::LinkMetricsRecordsFor(createOp) - recordsBefore;
const Uint64 waits = Transport::LinkMetricsReplyWaitsFor(createOp) - waitsBefore; const Uint64 waits = Transport::LinkMetricsReplyWaitsFor(createOp) - waitsBefore;
std::printf("create window ON: window=%u records=%llu waits=%llu high_water=%u\n", std::printf("non-retaining link: window=%u records=%llu waits=%llu taken=%llu pending=%u high_water=%u\n",
static_cast<unsigned>(MG_Config::Ipc.CreateWindow), static_cast<unsigned>(MG_Config::Ipc.CreateWindow),
static_cast<unsigned long long>(records), static_cast<unsigned long long>(records),
static_cast<unsigned long long>(waits), static_cast<unsigned long long>(waits),
static_cast<unsigned long long>(ClientCreateWindowTaken()),
static_cast<unsigned>(ClientCreateWindowPending()),
static_cast<unsigned>(highWater)); static_cast<unsigned>(highWater));
std::fflush(nullptr); std::fflush(nullptr);
if (records < 12) ::_exit(164); if (records < 12) ::_exit(164);
// THE DEFERRAL ITSELF, and the honest size of the claim: the first `window` records pay // NOTHING WAS DEFERRED AT ALL, and nothing was left outstanding: on a link that cannot
// nothing, so twelve records cannot pay twelve waits once anything was deferred. A ratio // retain, a window that deferred would be holding answers it may never get back.
// would be a promise about how fast the server answers, which is not this suite's to make. if (ClientCreateWindowTaken() != 0) ::_exit(177);
if (waits >= records) ::_exit(165); if (ClientCreateWindowPending() != 0) ::_exit(178);
// AND EVERY CREATE PAID ITS ROUND TRIP, which is the pre-window shape exactly. This is the
// assertion that goes red if the capability gate is removed.
if (waits != records) ::_exit(179);
// ---- AND THE SAME TWELVE WITH THE WINDOW OFF, IN THIS SAME CHILD ----
// The negative control shares everything with the ON half except the knob, which is what
// makes it a control rather than a second measurement. ONE WAIT PER RECORD is the
// pre-window shape: R-5 shipped with exactly that, and the whole change is the difference
// between the two lines this case prints.
MG_Config::Ipc.CreateWindow = 1;
const Uint64 offRecordsBefore = Transport::LinkMetricsRecordsFor(createOp);
const Uint64 offWaitsBefore = Transport::LinkMetricsReplyWaitsFor(createOp);
burst(12);
const Uint64 offRecords = Transport::LinkMetricsRecordsFor(createOp) - offRecordsBefore;
const Uint64 offWaits = Transport::LinkMetricsReplyWaitsFor(createOp) - offWaitsBefore;
std::printf("create window OFF: window=%u records=%llu waits=%llu\n",
static_cast<unsigned>(MG_Config::Ipc.CreateWindow),
static_cast<unsigned long long>(offRecords),
static_cast<unsigned long long>(offWaits));
std::fflush(nullptr);
if (offRecords < 12) ::_exit(166);
// ONE WAIT PER CREATE, EXACTLY. Every create on this path is an EmitAndWait, so the two
// counters are equal whatever else the row does - which is the assertion that cannot be
// satisfied by a window that is still deferring sometimes.
if (offWaits != offRecords) ::_exit(167);
ClientSessionInstance().Stop(); ClientSessionInstance().Stop();
}); });
ExpectChildSuccess(child); ExpectChildSuccess(child);
@@ -1314,14 +1300,18 @@ TEST(RemoteClientControls, ACreateWindowDefersTheAnswersAndTheWindowOffDoesNot)
// P12: A REFUSED CREATE LEAVES THE WINDOW - read ON THE LATCH AND ON THE SUSPECT LIST // P12: A REFUSED CREATE LEAVES THE WINDOW - read ON THE LATCH AND ON THE SUSPECT LIST
// ===================================================================================== // =====================================================================================
// //
// The window's answer is provisional, so the one thing it must never do is keep feeding a refused // The answer is what PUBLISHES an object, so the one thing a refusal must never do is leave the
// object fire-and-forget creates: the client would hold a confirmation the server has refused, for // client believing it landed: every row that reads the latch would then act on a record the server
// ever, and every row that reads the latch would believe it. The repair is deliberately the path // does not hold. This case reads the whole chain - the refusal leaves the object UNLATCHED, its
// that already existed - DECLINED un-latches the object, the object leaves the window, its next // next storage definition BLOCKS and is refused again, and giving the family its consumer back
// create BLOCKS and the refusal reaches the caller - and this case reads all three steps rather // HEALS it (the create is accepted and the latch comes back).
// than the symptom. It then reads the HEAL, which is the other half of the same rule: a blocking //
// create that lands puts the object back, so a transient refusal cannot retire an object from the // ⚠️ RUNS ON THE IN-PROCESS ARM (ShmLink), WHERE THE WINDOW IS OFF, so what repairs the object
// window for the rest of the process (or, at kCreateSuspectMax of them, retire the window). // here is the LATCH ALONE - the suspect table belongs to the window's provisional accept and the
// drain is the only thing that fills it, which this case now asserts by finding it EMPTY. The
// window's own refusal path is pinned on the arm it ships on (StreamLinkTest's declared-answer
// cases and the stream-arm window case); see the note on the gate above for why that split is not
// tidiness.
// //
// THE REFUSAL IS MADE REAL RATHER THAN SIMULATED, and it is the exact case the audit found the two // THE REFUSAL IS MADE REAL RATHER THAN SIMULATED, and it is the exact case the audit found the two
// ends can disagree about: the applier asks for bit 10 while the client's mirror still says the // ends can disagree about: the applier asks for bit 10 while the client's mirror still says the
@@ -1361,7 +1351,7 @@ TEST(RemoteClientControls, ARefusedCreateUnlatchesItsObjectAndItsNextCreateBlock
MG_Impl::GLImpl::GenTextures(1, &filler); MG_Impl::GLImpl::GenTextures(1, &filler);
defineStorage(filler, 8); defineStorage(filler, 8);
} }
// ---- (a) THE LATCH IS CLEAR AND THE OBJECT IS OUT OF THE WINDOW ---- // ---- (a) THE LATCH IS CLEAR, AND THE WINDOW NEVER RAN HERE AT ALL ----
const auto refusedObject = MG_State::pGLContext->GetTextureObject(refused); const auto refusedObject = MG_State::pGLContext->GetTextureObject(refused);
if (refusedObject == nullptr) ::_exit(174); if (refusedObject == nullptr) ::_exit(174);
const MG_Pipe::MGPipeHandle refusedHandle = const MG_Pipe::MGPipeHandle refusedHandle =
@@ -1370,9 +1360,14 @@ TEST(RemoteClientControls, ARefusedCreateUnlatchesItsObjectAndItsNextCreateBlock
// THE DIRECT READING, which is what the converted rows read: not "the create was refused" // THE DIRECT READING, which is what the converted rows read: not "the create was refused"
// but "this object is not published", which is the fact every fire-and-forget row acts on. // but "this object is not published", which is the fact every fire-and-forget row acts on.
if (MG_Pipe::MGPipeHandleIsPublished(MG_Pipe::MGPipeKind::Texture, refusedHandle)) ::_exit(176); if (MG_Pipe::MGPipeHandleIsPublished(MG_Pipe::MGPipeKind::Texture, refusedHandle)) ::_exit(176);
if (ClientCreateWindowRefusals() == 0) ::_exit(177); // AND THE WINDOW'S OWN BOOKS ARE EMPTY, because this arm cannot retain answers and the
// window therefore never deferred - `refusals` and `suspects` are both filled by the
// drain and by nothing else. A non-zero reading here would mean the capability gate had
// been removed and the row was deferring on a link that cannot hold an answer.
if (ClientCreateWindowRefusals() != 0) ::_exit(177);
const Uint32 suspectsBefore = ClientCreateWindowSuspects(); const Uint32 suspectsBefore = ClientCreateWindowSuspects();
if (suspectsBefore == 0) ::_exit(178); if (suspectsBefore != 0) ::_exit(178);
if (ClientCreateWindowPending() != 0) ::_exit(183);
// ---- (b) AND ITS NEXT CREATE BLOCKS: ONE WAIT PER CREATE, WITH THE WINDOW WIDE OPEN ---- // ---- (b) AND ITS NEXT CREATE BLOCKS: ONE WAIT PER CREATE, WITH THE WINDOW WIDE OPEN ----
// The window has room (the ceiling is 4 and this case has just drained it), so a deferring // The window has room (the ceiling is 4 and this case has just drained it), so a deferring
// row would pay ZERO waits here. Every create this restorage emits pays one instead, which // row would pay ZERO waits here. Every create this restorage emits pays one instead, which
@@ -1390,18 +1385,17 @@ TEST(RemoteClientControls, ARefusedCreateUnlatchesItsObjectAndItsNextCreateBlock
if (suspectRecords == 0) ::_exit(179); if (suspectRecords == 0) ::_exit(179);
if (suspectWaits < suspectRecords) ::_exit(180); if (suspectWaits < suspectRecords) ::_exit(180);
// ---- (c) THE HEAL: GIVE THE FAMILY ITS CONSUMER BACK AND RE-DEFINE THE SAME OBJECT ---- // ---- (c) THE HEAL: GIVE THE FAMILY ITS CONSUMER BACK AND RE-DEFINE THE SAME OBJECT ----
// The create still blocks (the object is still suspect), now it LANDS, and landing is what // The create still blocks (the latch is still clear), now it LANDS, and landing is what
// takes it out of the suspect list - exactly one entry, because no other object is touched. // re-publishes the object for every row that reads the latch.
Srv::ServerSessionInstance().SetConsumedSubsystems(kMGPipeSubsystemsMigratedAtP4a); Srv::ServerSessionInstance().SetConsumedSubsystems(kMGPipeSubsystemsMigratedAtP4a);
defineStorage(refused, 32); defineStorage(refused, 32);
std::printf("refused create healed: published=%d suspects %u -> %u\n", std::printf("refused create healed: published=%d suspects=%u\n",
static_cast<int>(MG_Pipe::MGPipeHandleIsPublished(MG_Pipe::MGPipeKind::Texture, static_cast<int>(MG_Pipe::MGPipeHandleIsPublished(MG_Pipe::MGPipeKind::Texture,
refusedHandle)), refusedHandle)),
static_cast<unsigned>(suspectsBefore),
static_cast<unsigned>(ClientCreateWindowSuspects())); static_cast<unsigned>(ClientCreateWindowSuspects()));
std::fflush(nullptr); std::fflush(nullptr);
if (!MG_Pipe::MGPipeHandleIsPublished(MG_Pipe::MGPipeKind::Texture, refusedHandle)) ::_exit(181); if (!MG_Pipe::MGPipeHandleIsPublished(MG_Pipe::MGPipeKind::Texture, refusedHandle)) ::_exit(181);
if (ClientCreateWindowSuspects() != suspectsBefore - 1) ::_exit(182); if (ClientCreateWindowSuspects() != suspectsBefore) ::_exit(182);
ClientSessionInstance().Stop(); ClientSessionInstance().Stop();
}); });
ExpectChildSuccess(child); ExpectChildSuccess(child);
+14 -4
View File
@@ -727,17 +727,27 @@ TEST(RingTest, TheTwoFlagSpacesAreDisjointByTranslation) {
static_assert(Call(kHostSpan) == Rec(kRecBorrowSlot), "the kHostSpan/kRecBorrowSlot collision moved"); static_assert(Call(kHostSpan) == Rec(kRecBorrowSlot), "the kHostSpan/kRecBorrowSlot collision moved");
static_assert(Call(kReplySlot) == Rec(kRecVarTail), "the kReplySlot/kRecVarTail collision moved"); static_assert(Call(kReplySlot) == Rec(kRecVarTail), "the kReplySlot/kRecVarTail collision moved");
// kOptional has no ring counterpart at all: bit 5 is unused over there today. If a sixth // kOptional HAD no ring counterpart and now has one, which is exactly what this block said
// ring flag is ever added it lands on this bit, so this is where that is noticed. // would happen: "bit 5 is unused over there today; if a sixth ring flag is ever added it
// lands on this bit, so this is where that is noticed". P12 added it - kRecNoReply, "the
// server may skip this record's answer" - so ALL SIX call-flag bits now alias a ring bit and
// there is no spare bit left in either space.
static_assert(Call(kOptional) == (1u << 5), "kOptional moved"); static_assert(Call(kOptional) == (1u << 5), "kOptional moved");
static_assert(Call(kOptional) == Rec(kRecNoReply),
"the kOptional/kRecNoReply collision moved - the sixth and last alias");
// Exhaustiveness, from both ends. The generator pins kMGPipeCallFlagsAllBits from // Exhaustiveness, from both ends. The generator pins kMGPipeCallFlagsAllBits from
// MGPipe.h; this pins the ring's own set against it, so ADDING a flag to either enum is a // MGPipe.h; this pins the ring's own set against it, so ADDING a flag to either enum is a
// build break here rather than a wrong decode in the field. // build break here rather than a wrong decode in the field.
//
// THE RING SIDE OF THAT IS HAND-WRITTEN, so it is only as exhaustive as this list: a new
// enumerator that is not added below leaves the assert green. It has been extended for
// kRecNoReply; extend it again rather than reusing the count.
static_assert(kMGPipeCallFlagsAllBits == 0x3Fu, "MGPipeCallFlags grew or shrank"); static_assert(kMGPipeCallFlagsAllBits == 0x3Fu, "MGPipeCallFlags grew or shrank");
constexpr std::uint32_t kAllRingFlags = constexpr std::uint32_t kAllRingFlags =
Rec(kRecNeedsAck) | Rec(kRecHasBlob) | Rec(kRecPad) | Rec(kRecBorrowSlot) | Rec(kRecVarTail); Rec(kRecNeedsAck) | Rec(kRecHasBlob) | Rec(kRecPad) | Rec(kRecBorrowSlot) |
static_assert(kAllRingFlags == 0x1Fu, "RingRecordFlags grew or shrank"); Rec(kRecVarTail) | Rec(kRecNoReply);
static_assert(kAllRingFlags == 0x3Fu, "RingRecordFlags grew or shrank");
// ---- the runtime half, and it is NOT the story the collision table alone suggests ---- // ---- the runtime half, and it is NOT the story the collision table alone suggests ----
// //
@@ -11,6 +11,8 @@
#include <unistd.h> #include <unistd.h>
#include <atomic> #include <atomic>
#include <MG_Pipe/PipeRoute.h> #include <MG_Pipe/PipeRoute.h>
// P12: the create row's observables and the wire tables it is installed as.
#include <MG_Remote/Client/WireTables.h>
#include <MG_Impl/GLImpl/Getter/GL_Getter.h> #include <MG_Impl/GLImpl/Getter/GL_Getter.h>
#include <chrono> #include <chrono>
#include <thread> #include <thread>
@@ -194,6 +196,146 @@ namespace {
EXPECT_TRUE(StageIs(0x33)); EXPECT_TRUE(StageIs(0x33));
} }
// =====================================================================================
// P12: THE CREATE WINDOW, ON THE ARM IT SHIPS ON
// =====================================================================================
//
// WHY THIS CASE EXISTS AT ALL, and it is not symmetry. The window's own gates run in
// RemoteClientControls, whose session is `TransportMode::InProcess` - ShmLink - where the window
// is now OFF BY DESIGN, because a shared pool's slot is `seq % slotCount` and is reused, so a
// deferred answer may be gone with no way to recover it. That means EVERY window-level gate in
// the tree runs on the arm the feature does not ship on: three rounds of this feature were
// green in the lanes while being inert on the device for exactly that reason. This case runs on
// a real StreamLink with a real ClientSession and a peer that answers, which is the arm the
// device runs, and it asserts the one property the device measured as broken: every deferred
// answer comes BACK.
//
// THE PEER IS A SERVO, not a server: it pops each record, answers its seq, and publishes the
// watermark, which is all the row needs (nothing here applies a record, and the row does not
// care). What it must NOT do is answer late or out of order - the reply must precede the
// progress frame that publishes its seq, because the drain's `WaitForApplied` oracle and the
// store's invariant both rest on that ordering (StreamLink::PostReply sends Reply then
// SendProgress under one lock).
class StreamClientWindow : public StreamClientPublication {
protected:
std::atomic<bool> servoStop{false};
std::thread servo;
std::atomic<std::uint64_t> answered{0};
void SetUp() override {
StreamClientPublication::SetUp();
// `Start()` does this on the real path (ClientSession.cpp:1615); this harness enters
// through FinishStartup, so the routed rows have to be installed by hand or
// MGPipeRouteResourceCreate would reach the monolith screen.
Client::InstallClientWireTables();
}
void TearDown() override {
servoStop.store(true);
if (servo.joinable()) servo.join();
Client::UninstallClientWireTables();
StreamClientPublication::TearDown();
}
void StartServo() {
servo = std::thread([this] {
std::uint64_t applied = 0;
while (!servoStop.load(std::memory_order_acquire)) {
Transport::RingRecordView view{};
if (!peer->CommandsIn().Pop(view)) {
std::this_thread::yield();
continue;
}
++applied;
const auto posted = peer->PostReply(applied, 0, nullptr, 0);
Transport::Watermark::AdvanceApplied(*peer->Memory().CmdControl(), applied);
const auto flushed = peer->FlushProgress();
if (posted != MOBILEGL_OK || flushed != MOBILEGL_OK) {
std::printf("servo stopped: record=%llu post=%d flush=%d\n",
static_cast<unsigned long long>(applied),
static_cast<int>(posted), static_cast<int>(flushed));
std::fflush(nullptr);
return;
}
answered.store(applied, std::memory_order_release);
}
});
}
};
TEST_F(StreamClientWindow, EveryDeferredCreateAnswerComesBackOnTheShippingArm) {
const Uint32 savedWindow = MG_Config::Ipc.CreateWindow;
MG_Config::Ipc.CreateWindow = 4;
StartServo();
const std::uint64_t takenBefore = Client::ClientCreateWindowTaken();
constexpr Int32 kCreates = 24;
const auto create = [](Int32 i) {
MG_Pipe::MGPResourceDesc desc{};
desc.Resource = MG_Pipe::MGPipeHandle{static_cast<Uint32>(i + 1), 1};
desc.Target = static_cast<Uint8>(MG_Pipe::MGPipeResourceTarget::Tex2D);
desc.InternalFormat = 1;
desc.Width = 4;
desc.Height = 4;
desc.Depth = 1;
desc.ArrayLayers = 1;
desc.Levels = 1;
desc.Samples = 1;
(void)MG_Pipe::MGPipeRouteResourceCreate(desc);
};
create(0);
// ---- AND THEN THE TRAFFIC THAT USED TO CROWD THE ANSWER OUT ----
// THIS IS THE CASE THE GATE IS FOR, and without it the case passes against a store that
// keeps only the last 8 answers (measured: it did). What killed the device was not the
// creates themselves but the OTHER answers arriving between a create being deferred and
// the drain coming back for it - the server is behind, and its late answers to the earlier
// records fill a bounded buffer first. So twelve more records whose answers are WANTED are
// emitted here, all of them declared and therefore all of them retained: a store bounded by
// the last N answers loses the create's here, and the store under test does not.
for (Int32 i = 0; i < 12; ++i) {
MG_Pipe::MGPTextureParams params{};
params.Res = MG_Pipe::MGPipeHandle{static_cast<Uint32>(100 + i), 1};
Int32 status = 0;
(void)client.EmitAndWaitTails(MG_Pipe::MGPWireOp::SetTextureParams, &params,
sizeof params, nullptr, 0, nullptr, 0, &status, nullptr,
/*wantReply=*/false, /*willReadReply=*/true);
}
// DELIVER THEM. A published record reaches the peer on a flush, not on PublishAndNotify -
// the case above this one is built on exactly that (`glFlush` is what exports the batch),
// and without this the servo sees nothing and the crowding never happens.
::glFlush();
// WAIT UNTIL THOSE ANSWERS HAVE ACTUALLY ARRIVED, or the crowding is a race the store can
// win by luck: the case would pass against the ring whenever the reader thread happened to
// be behind. The servo posts them synchronously, and the reader is a thread on a socketpair,
// so the settlement is a wait on the servo's own count plus one scheduling slice.
const auto settled = std::chrono::steady_clock::now() + std::chrono::seconds(2);
while (answered.load(std::memory_order_acquire) < 13 &&
std::chrono::steady_clock::now() < settled)
std::this_thread::yield();
std::this_thread::sleep_for(std::chrono::milliseconds(50));
ASSERT_GE(answered.load(), 13u) << "the peer did not answer the crowding records";
for (Int32 i = 1; i < kCreates; ++i) create(i);
const std::uint64_t taken = Client::ClientCreateWindowTaken() - takenBefore;
const Uint32 pending = Client::ClientCreateWindowPending();
// THE PROPERTY THE DEVICE MEASURED AS BROKEN: `Taken` counts the answers the drain has
// read OUT OF THE LINK'S STORE, so it can only move if retention works end to end - the
// wire declared each seq before publishing it, the peer answered it, the store kept it
// across however much traffic followed, and the drain found it again. On the device this
// number was FROZEN AT 63 for a whole load frame while the ring was 8 deep (`taken=63
// pushed=65 readfail=8,872`), which is exactly what a bounded buffer of the last N does.
//
// AND THE TAIL IS THE WINDOW'S OWN DEPTH, not a loss: nothing drains the window when no
// further create arrives, so the last `pending` answers stay held - which is what
// `pending` is. The conservation law is the assertion; `taken == kCreates` would be
// asserting that the row drains on a path it does not have.
EXPECT_GE(taken, static_cast<std::uint64_t>(kCreates) - Client::ClientCreateWindowEffective())
<< "the window collected " << taken << " of " << kCreates << " answers";
EXPECT_EQ(taken + pending, static_cast<std::uint64_t>(kCreates))
<< "answers were lost or invented: taken " << taken << " + pending " << pending;
EXPECT_LE(pending, Client::ClientCreateWindowEffective());
// AND THE ROW REALLY IS DEFERRING HERE, so the case cannot pass by taking the blocking
// path on every create (which is what a link the window refuses to run on looks like).
EXPECT_EQ(Client::ClientCreateWindowEffective(), 4u);
EXPECT_TRUE(client.LinkRetainsReplies());
MG_Config::Ipc.CreateWindow = savedWindow;
}
class StreamClientStagingProcess : public StreamClientPublication { class StreamClientStagingProcess : public StreamClientPublication {
protected: protected:
pid_t peerPid = -1; pid_t peerPid = -1;
+55
View File
@@ -116,6 +116,11 @@ namespace {
Queue(2, 2); Queue(2, 2);
ASSERT_EQ(client.Flush(), MOBILEGL_OK); ASSERT_EQ(client.Flush(), MOBILEGL_OK);
ASSERT_EQ(apply.WaitForWork(2000), SessionWait::Reached); ASSERT_EQ(apply.WaitForWork(2000), SessionWait::Reached);
// P12: AN ANSWER IS KEPT ONLY IF SOMEBODY DECLARED IT WILL BE READ. Seq 1 is deliberately
// NOT declared - this case is about an unwanted reply not disturbing a later one - and
// seq 2 is, because the case reads it. Both records cross either way: the declaration
// changes whether the LINK keeps the answer, never whether the server sends it.
client.DeclareReplyRead(2);
ASSERT_TRUE(apply.ApplyOne([&](const RingRecordView&) { ASSERT_TRUE(apply.ApplyOne([&](const RingRecordView&) {
const std::uint64_t value = 11; const std::uint64_t value = 11;
EXPECT_EQ(server.PostReply(1, 0, &value, sizeof value), MOBILEGL_OK); EXPECT_EQ(server.PostReply(1, 0, &value, sizeof value), MOBILEGL_OK);
@@ -152,6 +157,7 @@ namespace {
Queue(3, 3); Queue(3, 3);
ASSERT_EQ(client.Flush(), MOBILEGL_OK); ASSERT_EQ(client.Flush(), MOBILEGL_OK);
ASSERT_EQ(apply.WaitForWork(2000), SessionWait::Reached); ASSERT_EQ(apply.WaitForWork(2000), SessionWait::Reached);
for (std::uint64_t seq = 1; seq <= 3; ++seq) client.DeclareReplyRead(seq);
for (std::uint64_t seq = 1; seq <= 3; ++seq) { for (std::uint64_t seq = 1; seq <= 3; ++seq) {
ASSERT_TRUE(apply.ApplyOne([&](const RingRecordView&) { ASSERT_TRUE(apply.ApplyOne([&](const RingRecordView&) {
const std::uint64_t value = seq * 11; const std::uint64_t value = seq * 11;
@@ -175,6 +181,55 @@ namespace {
} }
} }
// =====================================================================================
// P12: THE DECLARED-ANSWER STORE - WHAT A BOUNDED BUFFER OF "THE LAST N" COULD NOT DO
// =====================================================================================
//
// The create window defers an answer across an unbounded amount of other traffic (measured on
// the device: ~1,000 records between two creates) and a buffer of the last N answers has always
// moved on by the time the reader comes back - `want=310` on every miss while the ring spanned
// [1175..1504]. Ring 8 -> 1024 as an experiment made every deferred answer come back, and these
// two cases are what replaces that stand-in: an answer is kept because somebody DECLARED it
// will be read, so the retained set is bounded by the client's own deferral depth.
TEST_F(StreamPair, ADeclaredAnswerSurvivesFarMoreInterveningAnswersThanAnyFixedBuffer) {
constexpr std::uint64_t kIntervening = 64;
client.DeclareReplyRead(1);
const std::uint64_t wanted = 0x5EED;
ASSERT_EQ(server.PostReply(1, 0, &wanted, sizeof wanted), MOBILEGL_OK);
// SIXTY-FOUR answers nobody declared. Under "keep the last N" - any N this link has ever
// had - seq 1 is gone by the end of this loop; under a declaration it is untouched, which
// is the whole difference between a bound and a probability.
for (std::uint64_t seq = 2; seq <= kIntervening + 1; ++seq) {
const std::uint64_t junk = seq;
ASSERT_EQ(server.PostReply(seq, 0, &junk, sizeof junk), MOBILEGL_OK);
}
EXPECT_TRUE(Eventually([&] { return client.SkippedUnwanted() >= kIntervening; }))
<< "the undeclared answers were not dropped: " << client.SkippedUnwanted();
std::int32_t status = -1;
const void* p = nullptr;
std::uint64_t size = 0;
ASSERT_EQ(client.ReadReply(1, &status, &p, &size), MOBILEGL_OK)
<< "the declared answer did not survive " << kIntervening << " intervening ones";
ASSERT_EQ(size, sizeof(std::uint64_t));
std::uint64_t value = 0;
std::memcpy(&value, p, sizeof value);
EXPECT_EQ(value, wanted);
EXPECT_EQ(status, 0);
// AND TAKING IT RELEASED IT: the store holds only what is still outstanding, which is why
// its capacity can be tied to the window's depth rather than to the server's answer rate.
EXPECT_EQ(client.RetainedOutstanding(), 0u);
EXPECT_EQ(client.RetainedTotal(), 1u);
}
TEST_F(StreamPair, AnAnswerNobodyDeclaredIsNotKeptAtAll) {
const std::uint64_t value = 7;
ASSERT_EQ(server.PostReply(1, 0, &value, sizeof value), MOBILEGL_OK);
EXPECT_TRUE(Eventually([&] { return client.SkippedUnwanted() >= 1; }));
EXPECT_EQ(client.RetainedOutstanding(), 0u)
<< "an undeclared answer was retained: the store would grow with the SERVER's answer"
" rate, which is what makes any capacity a matter of luck";
}
TEST_F(StreamPair, EventDrainReturnsCreditAndClearsRemoteFullLatch) { TEST_F(StreamPair, EventDrainReturnsCreditAndClearsRemoteFullLatch) {
EventRingProducer events(serverMemory.EventControl(), serverMemory.CmdControl(), serverMemory.EventRingBase(), EventRingProducer events(serverMemory.EventControl(), serverMemory.CmdControl(), serverMemory.EventRingBase(),
1024); 1024);
@@ -0,0 +1,63 @@
# FCL Integration Checklist (MobileGL C/S, FCL 0 改动)
> 状态:代码完成态(phase 2,禁用 shell,未编译/未真机)。
> 目标读者:MobileGL 核心开发者 + 验证者。本文件把 FCL 启动全链路与 MobileGL
> 组件逐点划上钩,并记录已知不支持面(以 `generated_trampoline_coverage.txt` 为准)。
## 1. 启动链路逐点映射
| # | FCL 行为(来源) | MobileGL 组件 | 状态 |
|---|---|---|---|
| 1 | 安装渲染器插件 APK(`top.mobilegl.plugin`) | `android-plugin/app`(`:MobileGL` 产 `jniLibs`) | ✅ 配置完成 |
| 2 | 校验 `renderer` / `pojavEnv`(`PluginNativeLoadGuard.verifyRendererLibraries`) | manifest: `MobileGL C/S:libMobileGL_Client.so:/libMobileGL_Client.so` + `DLOPEN=…` | ✅ |
| 3 | `LD_LIBRARY_PATH` 指向插件 native 目录 | 无需客户端特殊处理 | ✅ |
| 4 | `DLOPEN` 依序加载 FullServer/UtilRuntime/BackendObject | `mobilegl_fullserver_create` 再用同路径 `dlopen`(幂等) | ✅ |
| 5 | dlopen `glLib` = `libMobileGL_Client.so` | `ClientTrampoline` 首次调用 → `InitializeFromEnvironment()` | ✅ |
| 6 | `-Dorg.lwjgl.opengl.libname=…` | LWJGL 加载 Client `.so`,经导出 `egl*`/`gl*` | ✅(受支持子集) |
| 7 | 游戏线程调 `eglGetDisplay/Initialize/CreateContext/MakeCurrent` | M1 EGL trampoline(DisplayCreate/GroupCreate/SessionCreate + `SetCurrentSession`) | ✅ |
| 8 | 游戏调 GL 命令 | `generated_wire_trampoline.cpp`(`Wire::SendGl*` → FullServer → DirectGLES) | ✅(受支持子集) |
| 9 | 对象创建(`glGenTextures` 等) | `ret_bytes` 通道(服务端分配 + 客户端拷贝) | ✅ |
| 10 | 数据上传(`glBufferData` 等带 size 字段) | `AllocateShm` + `memcpy` + `ret_i64` | ✅ |
| 11 | `glGetString` | `SendGetString` 专用通道 | ✅ |
| 12 | 进程退出 | `Client::Shutdown` → `mobilegl_fullserver_destroy`(join server thread) | ✅ |
## 2. 环境变量(`MOBILEGL_CS_*`)
见 README「Runtime environment variables」表。插件 manifest 已固化:
`MOBILEGL_CS_MODE=inprocess`、`MOBILEGL_CS_BACKEND=DirectGLES`。
## 3. 已知不支持面(eglGetProcAddress 返回 nullptr / 生成器跳过)
| 类别 | 例子 | 计划 |
|---|---|---|
| 无尺寸 out 参数 | `glGetIntegerv` / `glGetFloatv`(已支持:共享 `MobileGLQueryCount` 表 + `out_capacity`) | ✅ 已实现 |
| 多级指针 | `glShaderSource`(已支持:shm NUL 拼接 + FullServer opcode 拦截重建指针数组);`glGetActiveAttrib/Uniform` 等仍待 | 部分支持 ✅/待补 |
| 输入向量 | `glUniform*`(已支持:客户端物化 + 内联向量) | ✅ 已实现 |
| 指针返回(非 GetString) | `glMapBufferRange`(typed 通道已覆盖) | 保持 typed 路径 |
| EGL 全量 | `eglCreateSync` / `eglCreateImage` 等 | 后续补齐 |
**安全红线**:任何返回写入都必须遵守“服务端知道写入量 ≤ 客户端缓冲区容量”。
当前仅对带 `n/count/num` 的 out 向量允许自动分配;无尺寸查询保持 unsupported。
## 4. 验证步骤(需要 shell/构建工具,phase 2 禁用,留待后续阶段)
```sh
# 1) 代码生成 + 编译(Linux)
cmake -S . -B build_agent -DMOBILEGL_BUILD_TEST=ON -DMOBILEGL_BUILD_CS_REFACTOR=ON -DMOBILEGL_FLATC=/tmp/flatc_bin/flatc
cmake --build build_agent --target MobileGL_Client MobileGL_FullServer MobileGL_UtilRuntime BackendObject_DirectGLES -j
# 2) 生成覆盖报告
cat MobileGL/MG_Client/generated_trampoline_coverage.txt
# 3) 单元/传输回归
ctest --test-dir build_agent -L unit -j
# 4) 插件 APK(Android,需要 SDK/NDK 27.3)
cd android-plugin && ./gradlew :app:assemblePluginRelease
```
## 5. 验收标准(M1/M2/M3)
- **M1**:裸进程 `libMobileGL_Client.so` + in-process hosting → `eglGetDisplay/Initialize/MakeCurrent/glClear/glReadPixels` 全通。
- **M2**:FCL 选择「MobileGL C/S」渲染器,进入 Minecraft 主菜单(对象创建 + 数据上传 + GetString 必通)。
- **M3**:游戏可玩(渲染正确、crash-free、退出无挂起线程)。
+130
View File
@@ -0,0 +1,130 @@
# MobileGL C/S: Handle / Session / Generation 统一语义
> 状态:Phase 0 契约文档(与 `C_S_REFACTOR_PLAN.md` §5 一一对应)
> 范围:FullServer、Client、BackendObject、UtilRuntime 共用的对象标识语义
> 读者:所有实现 BFA / 外部协议的模块
---
## 1. ID 层级
```text
DisplayId
└─ SharedGroupId
└─ SessionId
└─ ObjectHandle(共享对象在 SharedGroup 级;上下文私有对象在 Session 级)
```
所有 ID 均为 `uint64_t`,由 FullServer 在进程生命周期内分配,**不复用**。`0` 保留为无效 ID。
| ID | 分配者 | 生命周期 | 语义 |
|---|---|---|---|
| `MobileGLDisplayId` | FullServer (EGL) | `eglGetDisplay` → `eglTerminate` | 一个 EGLDisplay 的句柄;持有 backend device |
| `MobileGLSharedGroupId` | FullServer | 首个无 share 的 context 创建 → group 内全部 context 销毁 | 共享对象表、ShareGroup 级 backend native 资源 |
| `MobileGLSessionId` | FullServer | `eglCreateContext` → `eglDestroyContext` | 一个 GL context;持有 current bindings / error queue |
| `MobileGLBackendHandle` | FullServer | 对象创建 → 对象销毁 | 不透明对象句柄,与 GL name 解耦 |
## 2. 归属规则
| 状态 | 归属 |
|---|---|
| EGL display / config / surface | DisplayId |
| GL 共享对象表(buffer/texture/sampler/VAO/program/shader/pipeline/FBO/RBO/TF) | SharedGroupId |
| 上下文私有对象(default FBO/VAO/texture 0、query、sync 等) | SessionId |
| current bindings / render state / viewport / error queue | SessionId |
| backend native 共享资源(VkBuffer/VkImage/pipeline/sampler) | SharedGroupId |
| command pool / descriptor pool / frame tracking / deferred release | SessionId |
| 硬件设备 / loader | DisplayId |
## 3. ObjectHandle 模型
```text
ObjectHandle = uint64_t
- FullServer 分配,进程生命周期内不复用
- 共享对象:同一 handle 在 SharedGroup 内所有 Session 可见
- 上下文私有对象:仅所属 Session 有效
- 与 GL name 解耦
- 映射:
共享对象 (SharedGroupId, ObjectKind, GLname) → handle
上下文私有 (SessionId, ObjectKind, name/slot) → handle
```
设计理由:
- 天然支持 name 0 默认对象、proxy texture、texture view、reserved-but-not-materialized 对象;
- 避免 `SharedPtr<T>` / 裸指针跨插件边界;
- 未来 share group 语义扩展不需要改接口。
## 4. 映射表(FullServer 拥有)
FullServer 维护以下 Registry(线程安全):
```text
DisplayRegistry : DisplayId -> DisplayInfo
SharedGroupRegistry : SharedGroupId -> SharedGroupInfo
SessionRegistry : SessionId -> SessionInfo
SharedObjectRegistry : { SharedGroupId, ObjectKind, GLname } -> BackendHandle
PrivateObjectRegistry : { SessionId, ObjectKind, name/slot } -> BackendHandle
```
Backend 不再持有 frontend `SharedPtr<T>`:只接收 `BackendHandle` 并通过
`BackendHost` 查询信息。Frontend 对象销毁时调用
`BackendVTable::OnObjectDestroyed` 显式通知。
## 5. Generation 机制
| frontend 现状 | BFA 字段 |
|---|---|
| `GetShapeVersion / GetContentVersion / GetTextureParamsVersion` | `TextureInfo.generation / contentGeneration / paramsGeneration` |
| `GetTextureBindGeneration / GetSamplingResolutionGeneration` | `TextureInfo.bindGeneration / samplingGeneration` |
| `GetRenderStateParametersVersion / GetPipelineStateVersion` | `RenderState.version / pipelineVersion` |
| `GetLinkVersion / GetBackendStateVersion / GetUniformWriteSetVersion / GetUBOContentVersion / GetBlockBindingVersion` | `ProgramInfo.*Generation` |
| `GetConfigVersion / GetAttributeVersion` | `VertexArrayInfo.generation / attribs[].generation` |
| `GetObjectVersion / GetAllFramebufferAttachmentVersions` | `FramebufferInfo.generation` |
| `SamplerObject::GetVersion` | `SamplerInfo.generation` |
| `GetTransformFeedbackGeneration` | `TransformFeedbackInfo.generation` |
| `GetTextureContextId` | SessionId 来源 |
Backend 缓存 key:
```text
{ SharedGroupId, ObjectHandle, objectGeneration }
```
约定:
- Generation 只在 FullServer 修改(单调递增,不回绕);
- Backend 只比较、不推导;
- `generation` 变了就整级/整对象重传,v1 不做 dirty-rect 增量。
## 6. 跨层数据通路(只读快照,调用期有效)
| 数据 | Host 接口 | 生命周期 |
|---|---|---|
| Buffer shadow | `GetBufferShadow` | 调用期有效,Backend 必须 copy |
| Buffer range | `ReadBufferRange` | 同步拷贝 |
| Texture mip | `GetTextureMipInfo` + `GetTextureMipData` | 同步拷贝 |
| Program 模块 | `GetProgramModules` | 返回的 SPIR-V 指针调用期有效 |
| Persistent map | `BufferAcquirePersistentMap` | Backend 管理的 GPU 映射 |
## 7. 线程模型
- 同一 `(sessionId, clientThreadId)` 流严格 FIFO;
- 同一 session 的 backend 调用串行;
- 不同 session/thread 可并发,Host 查询线程安全;
- v1 禁止 backend 自建线程回调 Host。
## 8. C ABI 类型映射
| 语义 | C 类型 |
|---|---|
| DisplayId | `uint64_t` |
| SharedGroupId | `uint64_t` |
| SessionId | `uint64_t` |
| BackendHandle | `uint64_t` |
| Generation | `uint64_t` |
| Bool | `bool`(`stdbool.h`) |
| Size | `uint64_t` |
| 错误码 | `int32_t` + Host `RecordError` |
所有 BFA / RuntimeApi 契约头不包含任何 C++ 类型。
+220
View File
@@ -0,0 +1,220 @@
# C/S Refactor Implementation Status
> 更新:Phase 0-2 完成;Phase 3 DirectGLES 真实 BFA 插件已接入(EGL/GLES 自包含,24+ 类命令真实 entry point);**本 session 按用户决策跳过 DirectVulkan 迁移**;Phase 4 完成 Token↔session 失效模型 + 全量 1396 API codegen 运行时分发(1171 supported / 225 unsupported 分类;客户端 1170 个 `SendGl*` wrapper);Phase 6 完成 Win32/Android Surface 条件代码 + batch/大 payload 零拷贝基准;**Linux 全量单元回归 1448/1448 通过(3 skipped)**。
> 分支:`Feat/cs-refactor`(从 `dev@81b17c0` 创建)
> 最新 HEAD:`6d3e5132 [Feat] (MG_Protocol, MG_Client, MG_FullServer): Add EGL MakeCurrent/SwapInterval/ResizeSurface commands.`(EGL 命令提交后)
> 首次提交:`9be8bcff [Feat] (All): Add C/S refactor Phase 0-5 scaffolding and state/handle registry.`
> 源码目录约定:新 C/S 模块统一使用项目原有的 `MG_*` 前缀(`MG_Protocol` / `MG_Client` / `MG_FullServer` / `MG_Transport` / `MG_UtilRuntime`),保持 `MobileGL/` 下模块分层一致。
## 本阶段验证记录(已通过)
- 配置:`cmake -S . -B build_agent -DMOBILEGL_BUILD_TEST=ON -DMOBILEGL_BUILD_CS_REFACTOR=ON` ✅
- monolith(`MobileGL` / `MobileGL_s`)编译通过 ✅
- C/S 目标编译通过:`libMobileGL_FullServer.so`(链接 `libMobileGL_MG_FullServerCore.a`)、`libMobileGL_Client.so`、`libMobileGL_UtilRuntime.so`、`BackendObject_DirectGLES.so`、`BackendObject_DirectVulkan.so`、`libMobileGL_Transport.a` ✅
- 单元测试:`ContextRegistryTest` 5/5、`HandleRegistryTest` 5/5 通过 ✅
- **目录重构后全量验证**:C/S 目标与全部相关测试重编译通过;`SanityTest` 82/82、`InProcessTransportTest` 1/1、`BigServerE2ETest` 1/1 通过;`libMobileGL_FullServer.so` 构建成功
- **全量 ctest(unit)**:1442/1442 通过(3 skipped)✅(含 ClientQueryResults 等新测试)
- **本 session 全量回归(Commit 713a9536 之后)**:`cmake -S . -B build_agent -DMOBILEGL_BUILD_TEST=ON -DMOBILEGL_BUILD_CS_REFACTOR=ON` + `ninja -C build_agent -j10` ✅;`ctest --test-dir build_agent -L unit -j10` **1448/1448 通过(3 skipped)** ✅(含 ClientTokenSessionTest 2/2、ClientWirePayloadTest 1/1、ProtocolDispatchCoverageTest 3/3)
- **本 session 基准实测(批量零拷贝后)**:`ShmPayloadBenchmark` single(1B,20 iter) per-command avg 40.7µs / min 34.9µs / max 62.1µs;batch 多命令帧(64条/帧) avg **5.3µs/条**、帧 avg 340.1µs;large-batch(4MiB×64) avg **5.0µs/条**、帧 avg 317.8µs(serverOk=1;相对逐条提交 17.4µs/条 → 5.3µs/条)
- 第二次构建(共享 Buffer 表迁移后):`BufferState` 委托 group 级 `SharedBufferObjectTable`,跨 session 可见性测试通过 ✅
## FCL 接入(FCL 0 改动,代码完成态,未编译验证)
目标:MobileGL C/S 作为一个标准 FCL 渲染器插件 APK 使用;FCL 代码零改动。Client 库通过 `dladdr` 自动定位与启动同目录 `libMobileGL_FullServer.so`。
- [x] `MOBILEGL_CS_*` 环境变量运行时选择:
- `MOBILEGL_CS_MODE` = `inprocess`(默认,自动宿主)/ `connect`(连接既有 server)
- `MOBILEGL_CS_ENDPOINT` / `MOBILEGL_CS_BACKEND` / `MOBILEGL_CS_SERVER_UTIL` / `MOBILEGL_CS_SERVER_BACKEND` / `MOBILEGL_CS_DEBUG`
- 实现:`MobileGL/MG_Client/ClientEnv.h/.cpp`
- [x] Client 自动宿主:`MobileGL::Client::InitializeFromEnvironment()` —— `inprocess` 下 `dlopen` 同目录 FullServer 并调用 `mobilegl_fullserver_create_inprocess`;`connect` 下走 `Initialize(endpoint)`;`Shutdown()` 先销毁宿主再释放 in-process 传输
- [x] FullServer 同进程宿主 C ABI:`mobilegl_fullserver_create_inprocess(utilPath, backendPath, &clientTransport, &clientOps)` —— `CreateInProcessTransportPair` + `ServerCore` + server thread;`destroy` 通过 `ServerShutdown` 哨兵唤醒阻塞的 `WaitResponses` 后 join
- [x] `MG_Protocol/control.h`:`ServerShutdown = 1'000'050`(唤醒哨兵,宿主线程拥有退出权)
- [x] M1 引导级 Client trampoline:`MobileGL/MG_Client/ClientTrampoline.cpp` 导出 EGL 核心子集(display/config/context/pbuffer/makecurrent/swapbuffers/getprocaddress)+ `glClearColor/glClear/glViewport/glDrawArrays/glReadPixels/glGetString/glGetError/glFlush/glFinish` 子集;`eglGetProcAddress` 对未覆盖符号返回 NULL
- [x] EGL wire codegen 管线扩展(脚本层,构建期重新生成):
- `scripts/generate_protocol_fbs.py`:解析 `EGLImpl/Exporting/Definitions.cpp`,产出 `Egl*` payload 表(与 `Gl*` 合并)
- `scripts/generate_wire_full_fbs.py`:`Egl*` → `Gen*` 表
- `scripts/generate_wire_dispatch.py`:EGL 条目产出 `::egl<Name>(...)` 分发 + EGL 类型 cast(handle/标量/数组)
- `scripts/generate_wire_client.py`:生成 `SendEgl*` wrapper
- `MobileGL/MG_Protocol/CMakeLists.txt`:EGL Definitions 加入三个 codegen 的 DEPENDS
- [x] 标量回传通道(response.ret_i64):
- `MobileGL/MG_Protocol/wire.fbs` `Response` 增加 `ret_i64: long`(`wire_full.fbs` 模板同步)
- `generate_wire_dispatch.py`:非 void 支持条目捕获返回值(整型 `StoreI64` / 句柄指针 `StoreU64`),暴露 `WireDispatchReturnValid/ReturnI64`
- `FullServerEntry`:`WireDispatchWithSession` 捕获后经 `WireRetProvider` 回调转发
- `ServerCore`:可选 `SetWireRet`(测试可不链接生成分发实现),回填 `Response.ret_i64`
- `Client::GetLastResponseRetI64()` 解析回传;`ServerCore`/`Client.cpp` 无 `generated_wire_dispatch.cpp` 链接依赖
- [x] InProcessTransport 内嵌共享内存:`InProcessLink` 持有 `slot`(同一进程共享指针),`OpenSharedMemory/ReceiveShmHandle/SubmitCommands` 帧携带 `MobileGLShmHandle`(含 `mappedAddress`),使 `ReadPixels/BufferReadback/Texture/Buffer shm 上传`在 in-process 模式下可用(FCL 同进程路径不再依赖 `memfd/SCM_RIGHTS`)
- [x] 生成式全量 trampoline(受支持子集):
- `scripts/generate_client_trampoline.py`:从 `generated_dispatch.h` + `wire_full.fbs` + GL Definitions 生成 `generated_wire_trampoline.h/.cpp`(`MOBILEGL_GL_API` 导出)
- 规则:标量/string 参数直接透传;`ShmRegion` 参数且带 size 字段的条目(`glBufferData` 等)自动 `Client::AllocateShm` + memcpy + 释放;标量返回走 `GetLastResponseRetI64()`;`glGetString` 走 `SendGetString`;out-vector/多级指针/无表条目跳过(`eglGetProcAddress` 返回 NULL)
- `Client::SetCurrentSession/GetCurrentSessionId` + `AllocateShm/ReleaseShm` 基础设施
- `ClientTrampoline.cpp` 保留 EGL + 4 个无表 GL 条目(`glReadPixels/glFlush/glFinish/glGetError`),其余 GL 由生成器接管;`MG_TrampolineGen` 目标 + `MobileGL_Client` 依赖 + `.gitignore` 忽略生成物
- [x] out-vector 回传通道(`Response.ret_bytes`):
- `wire.fbs`/`wire_full.fbs` `Response` 追加 `ret_bytes: [ubyte]`
- `generate_wire_dispatch.py`:非 const 向量参数(`glGen*` 家族,带 `n/count/num` 计数)分配服务端缓冲区 → 调用 → `WireDispatchStoreBytes`;新增 `WireDispatchBytes/BytesSize`
- `WireRetFn` 扩展为 `(valid, i64, bytes, bytesSize)`;`FullServerEntry` 转发字节;`ServerCore` 以 `CreateVector` 回填
- `Client::GetLastResponseBytes()`;`generate_wire_client.py` 对 out-vector 不再发值;`generate_client_trampoline.py` 对 `glGenTextures/glGenBuffers/...` 拷贝 `ret_bytes` 到调用者缓冲区
- [x] 插件 APK 打包方案(`android-plugin/`,FCL 0 改动):
- `android-plugin/app/build.gradle.kts`:V2 DSL `rendererGLPath/EGLPath` = `libMobileGL_Client.so`;`dlopenLibPaths` = FullServer/UtilRuntime/BackendObject_DirectGLES;env 增加 `MOBILEGL_CS_MODE=inprocess`、`MOBILEGL_CS_BACKEND=DirectGLES`
- legacy manifest(旧 FCL `RendererPlugin.kt` 读取):`renderer` = `MobileGL C/S:libMobileGL_Client.so:/libMobileGL_Client.so`;`pojavEnv/boatEnv` 增加 `DLOPEN=libMobileGL_FullServer.so,libMobileGL_UtilRuntime.so,BackendObject_DirectGLES.so` + `MOBILEGL_CS_*`
- 根 `build.gradle`(`:MobileGL` 模块):CMake 增加 `-DMOBILEGL_BUILD_CS_REFACTOR=ON`(default/for-debug/trace 三处)
- [x] 无尺寸 out 参数(getter 族)通道:
- `MobileGL/MG_Protocol/query_sizes.h`:共享 pname→count 表(VIEWPORT/SCISSOR/COLOR_WRITEMASK/DEPTH_RANGE 等,未知回退 1)
- wire `Command.out_capacity`;`SendWirePayload(+outCapacity)`;`WireDispatchFn(+outCapacity)`
- 生成分发对无 count 的 out 向量使用 `outCapacity` 分配;trampoline 用同一张表传容量并拷贝 ret_bytes
- `glGetIntegerv/glGetFloatv/glGetDoublev/glGetBooleanv/glGetInteger64v` 进入支持集
- [x] EGL window/平台 surface 路径:
- wire `EglCreateWindowSurface{native_window}` + `SendEglCreateWindowSurface` + ServerCore `CreateWindowSurface`(backendType Android=3 / 其他=1)
- M1 trampoline 导出 `eglGetPlatformDisplay(+EXT)`、`eglCreateWindowSurface`、`eglCreatePlatformWindowSurface` 并登记 getproc
- [x] 输入向量(`glUniform{1,2,3,4}{f,i,ui}*v` / `glUniformMatrix*` / `glDelete*`):trampoline 生成器把 `const T*` 物化为 `std::vector<T>`(元素数:uniform 由函数名推断——`Matrix{N}fv=N²`、`Matrix{N}x{M}fv=N*M`、其余为 N;delete 为 1)交给 wrapper 内联路径;服务端既有 `[vector]` 解码透传指针
- [x] `glShaderSource` 专用路径(M2 关键:无着色器无法编译程序):
- Client `glShaderSource` 手写:NUL 拼接 count 个源码 → `AllocateShm` → `SendWirePayload`(`GenShaderSource` + ShmRegion)
- FullServer `WireDispatchWithSession` opcode 拦截:从 shm 重建 `const GLchar*[]`(按 NUL 切分),直接调用前端 `::glShaderSource`(count<1024 上限)
- [x] `glDelete*` 输入向量(count 驱动,elems=1,客户端物化向量走内联通道)
- [x] EGL 小函数补全(M1 bootstrap):`eglGetConfigs` / `eglGetConfigAttrib` / `eglQuerySurface` / `eglReleaseThread`(合成 config 语义 + getproc 登记)
- [x] `glTexImage2D` / `glTexSubImage2D` / `glTexImage3D` 纹理数据上传(手写 shm 通道:按 format/type 估算像素字节(UNSIGNED_BYTE RGB=3/RGBA=4 等,回退 4),`AllocateShm` + memcpy,走 `SendGlTexImage2D/SubImage2D/3D`;空指针走无 shm 路径)
- [x] EGL sync 族 bootstrap(eglCreateSync(合成 token)/ DestroySync / ClientWaitSync(Satisfied)/ GetSyncAttrib / WaitSync)+ `eglSwapInterval` 导出与 getproc 登记
- [x] `glGetActiveAttrib`/`glGetActiveUniform`(最后常用缺口):
- wire `ActiveVariable{program,index,buf_size}` + Command 字段;`Client::SendGetActiveAttrib/Uniform`
- FullServerEntry opcode 拦截:调前端 `::glGetActiveAttrib/Uniform`,打包 `[u32 length][u32 size][u32 type][name\0]` 经 `WireRetProvider` → `Response.ret_bytes`
- 客户端手写两个 gl 导出 + 解析解码(`DecodeActiveVariable`,bufSize≤1023)
- [ ] 剩余不支持面:EGL image/标号类(`eglCreateImage` 等)、`glMap*` 指针返回(typed 已有)
- [ ] FCL 真机安装验证
- [ ] 插件 APK 打包 + FCL 真机验证(下一步)
- ⚠️ 本段**未编译验证**:严格按用户要求在 router phase 2 (dev) 内实现,禁用 shell;仅做了只读符号一致性自检。
## Phase 0 — 契约定稿 ✅
- [x] `docs/CS_Refactor/HandleSessionGeneration.md` — Handle/Session/Generation 语义
- [x] `MobileGL/MG_Protocol/protocol.fbs` — FlatBuffers `Message` + `Payload` union 草案
- [x] `MobileGL/MG_Protocol/bfa.h` — Backend Frontend API strict C ABI
- [x] `MobileGL/MG_Protocol/mgruntime_api.h` — UtilRuntime 分域 sub-vtable C ABI
- [x] `MobileGL/MG_Protocol/transport.h` — Transport ops 定义
- [x] `MobileGL/MG_Protocol/api_manifest.txt` + `scripts/extract_api_manifest.py` — API 清单提取器(1720 条)
- [x] `scripts/generate_protocol_fbs.py` — 从 Definitions.cpp 生成 `protocol_generated.fbs`(2750 个 `Gl*` payload 表)
- [x] `MobileGL/MG_Protocol/CMakeLists.txt` — `MobileGL_Protocol` / `MobileGL_BFA` / `MobileGL_RuntimeApi` INTERFACE targets
## Phase 1 — 构建拆分(脚手架,待完整化)
- [x] 根 CMake 增加 `MOBILEGL_BUILD_CS_REFACTOR`(默认 OFF,保留 monolith 对照)
- [x] `MobileGL/MG_Client` — `MobileGL_Client` SHARED 骨架
- [x] `MobileGL/MG_FullServer` — `MobileGL_FullServer` SHARED(`libMobileGL_FullServer.so`,BigServer host 组件)
- [x] `FullServerEntry.h/.cpp` — C ABI 宿主入口:`mobilegl_fullserver_create/start/attach_transport/service_once/run_socket/destroy`
- [x] **跨进程 E2E(Python 客户端)**:Python + flatbuffers 构建 `Message` → ABC socket → `libMobileGL_FullServer.so` `run_socket` → null backend `Clear` → `Response{status=0}` 返回;验证成功
- [x] **dlopen 验证**:Python ctypes 加载 `libMobileGL_FullServer.so` → create(UtilRuntime.so, BackendObject_DirectGLES.so) → start → destroy 成功
- [x] `MobileGL/MG_UtilRuntime` — `MobileGL_UtilRuntime` SHARED 骨架(`mobilegl_util_api` 导出)
- [x] `MobileGL/MG_Backend/CMakeLists.txt` — `BackendObject_DirectGLES` / `BackendObject_DirectVulkan` MODULE 骨架 + manifest
- [x] 把真实 `MG_Impl / MG_State / MG_Util` 源列表拆入 `MobileGL_MG_FullServerCore`(STATIC,不含 MG_Backend),`MobileGL_FullServer.so` 链接它;monolith 仍保留作对照
- [x] **monolith 切换核对**:保留 monolith 作为对照,暂不删除——DirectVulkan 未迁入 BFA(用户本 session 跳过),等 DV 迁移完成后按 Phase 1 原计划再切
## Phase 2 — FullServer 状态模型(共享对象表迁移 + pGLContext 路由完成)
- [x] `MobileGL/MG_State/GLState/ContextRegistry.h/.cpp` — `GLSharedGroup` / `GLContextSession` / `GLContextRegistry`
- [x] `MobileGL/MG_State/GLState/SharedObjectTables.h` — group 级共享对象表容器(BufferState 起步)
- [x] EGL `CreateContext` / `DestroyContext` / `MakeCurrent` / `ReleaseThread` 接入 registry 生命周期
- [x] `MobileGL/MG_State/GLState/HandleRegistry.h/.cpp` — `(groupId/sessionId, kind, glName) → MobileGLBackendHandle`
- [x] `GLContext::GetObjectHandle` — 前端对象首次访问时分配/复用 C/S handle
- [x] Buffer/Texture 对象创建时分配 handle、删除时释放(`CreateBufferObject` / `CreateTextureObject` / `CreateTextureViewObject` / 对应 Mark*ForDeletion)
- [x] **Buffer 共享对象表迁移**:`SharedBufferObjectTable` 由 `SharedObjectTables` 持有,`BufferState` 的 name/object 表委托给 group;binding slots 仍 per-context(GL shareCtx 语义)
- [x] **Texture 共享对象表迁移**:`SharedTextureObjectTable` 由 `SharedObjectTables` 持有,`TextureState` 的 name/object 表委托给 group;default texture 与 unit bindings 仍 per-context
- [x] **Sampler 共享对象表迁移**:`SharedSamplerObjectTable` 由 `SharedObjectTables` 持有,`SamplerState` 的 name/object 表委托给 group
- [x] **Renderbuffer 共享对象表迁移**:`SharedRenderbufferObjectTable` 由 `SharedObjectTables` 持有,`RenderbufferState` 的 name/object 表委托给 group;binding slots 仍 per-context
- [x] **Framebuffer 共享对象表迁移**:`SharedFramebufferObjectTable` 由 `SharedObjectTables` 持有,`FramebufferState` 的 name/object 表委托给 group(含 FBO 0 语义);binding slots 仍 per-context
- [x] **VertexArray 共享对象表迁移**:`SharedVertexArrayObjectTable`(vector + name generator)由 `SharedObjectTables` 持有,`VertexArrayState` 的 object 表委托给 group;bound index/detached 仍 per-context
- [x] **Program/Shader 共享对象表迁移**:`SharedProgramObjectTable`(program/shaders 两个 vector + 联合 name generator)由 `SharedObjectTables` 持有,`ProgramState` 的 object 表委托给 group;`m_currentProgram` 与 compile caches 仍 per-context
- [x] **TransformFeedback 共享对象表迁移**:`SharedTransformFeedbackObjectTable`(对象 map + name generator)由 `SharedObjectTables` 持有;bound index / live capture state / buffer binding points 仍 per-context
- [x] **ProgramPipeline 共享对象表迁移**:`SharedProgramPipelineObjectTable`(pipeline map + name generator)由 `SharedObjectTables` 持有;bound pipeline index 仍 per-context
- [x] `MobileGL/MG_Test/State/ContextRegistryTest.cpp` / `HandleRegistryTest.cpp` — 单元测试(Buffer/Texture/Sampler/Renderbuffer/Framebuffer/VAO/Program/Shader/TransformFeedback/ProgramPipeline 跨 session 可见性验证)
- [x] **pGLContext 路由完成**:`pGLContext` 改为非拥有 `GLContext*`,EGL `MakeCurrent`/`ReleaseThread` 将其指向/清空当前 session;`SanityTest` 82/82 通过
- [x] **Query/Sync session-private 状态层**:`SessionPrivateState`(GLContext 拥有)落地;`GL_Sync.cpp` 与 `GL_Query.cpp` 的注册表/next-id/active 槽全部迁移到 session-private;`DestroyAll*` 按当前 session 清理;`pGLContext` 在 FullServer session 创建/销毁与每次 wire 分发时同步到当前 session(未编译验证前为代码完成态)
## Phase 3 — BFA 落地(进行中)
- [x] `MobileGL/MG_FullServer/BackendHost.h/.cpp` — FullServer 侧的 BackendHost vtable 骨架
- [x] `MobileGL/MG_FullServer/BackendPluginLoader.h/.cpp` — dlopen + manifest ABI 校验 + Create
- [x] `StateBackendObjectRegistry` 增加 handle-key 并行查找:`RegisterHandle` / `FindByHandle` / `UnregisterHandle`(主 map 仍按 state 指针走热路径;原生 Monolith 编译通过)
- [x] **Display / SharedGroup 生命周期控制**:`control.h` 增加 `DisplayCreate/Destroy` + `SharedGroupCreate/Destroy`;`Client::SubmitDisplayControl/SubmitSharedGroupControl`;`ServerCore` 调 `OnDisplayCreated/Destroyed/OnSharedGroupCreated/Destroyed`;`ClientHierarchyLifecycleTest` 1/1 通过
- [x] **DirectGLES 真实 BFA 插件初版**:`RealBackend.h/.cpp` 自包含 dlopen `libEGL`/`libGLESv2` + `eglGetProcAddress` 解析;`OnDisplayCreated` 初始化 surfaceless/默认 EGLDisplay 并选 config;`OnSessionCreated` 创建真实 EGLContext(ES3→ES2 fallback)+ pbuffer(失败退 surfaceless no-surface)并 `eglMakeCurrent`;`OnSessionDestroyed` 释放;Clear/ClearColor/DrawArrays/DrawElements/BufferSubData/DrawRangeElements/DrawArraysInstanced/DrawElementsInstanced/MemoryBarrier/MemoryBarrierByRegion/PatchParameteri/GenerateMipmap/DispatchCompute/DispatchComputeIndirect/TransformFeedback 全链/BlitFramebuffer/SwapBuffers/FenceSync/DeleteSync/WaitSync 走真实 GLES/EGL entry points(缺失入口安全 no-op);Buffer handle→GLuint、Sync handle→GLsync 映射;`GetRendererInfo/GetDynamicParameters` 由真实 `glGetString/glGetIntegerv` 回填
- [x] **符号/link 调研结论**:`nm -u -C BackendObject_DirectGLES.so` 仅 libc/libstdc++/libm 未定义符号,`ldd` 无任何 MobileGL_* 依赖;`libMobileGL_MG_FullServerCore.a` 里对 `gBackendFunctionsTable`/`pActiveBackendObject` 的引用由 `GlobalObjects.cpp` 定义、MG_Backend 实现源码未进核心库;link 方案 = **插件自包含真实 BFA 适配器**(方案 A),不链接前端静态库,无双份 static 状态问题
- [x] **FullServer 侧 BFA shim 初版**:`MobileGL/MG_FullServer/BfaFrontendShim.h/.cpp` —— 把旧 `gBackendFunctionsTable.GL` 的 Clear/ClearBuffer*/ClearNamedFramebuffer*/BlitNamedFramebuffer/DrawArrays/DrawElements/DrawElementsBaseVertex/DrawArraysIndirect/DrawElementsIndirect/MultiDraw*/DrawArraysInstanced/DrawElementsInstanced/DrawRangeElements/BlitFramebuffer/CopyTexImage2D/CopyTexSubImage2D/CopyImageSubData/GetTexImage/GetTextureImage/GenerateMipmap/ReadPixels/DispatchCompute/DispatchComputeIndirect/MemoryBarrier/MemoryBarrierByRegion/BindImageTexture/PatchParameteri/TransformFeedback 全链/Bind+DeleteTransformFeedback/ShaderStorageBlockBinding/FenceSync/ClientWaitSync/DeleteSync/WaitSync/GetSyncStatus/时间查询全链(BeginTimeElapsed/QueryCounter/IsQueryResultAvailable/GetQueryResult64/DeleteBackendQuery/Occlusion/Xfb 查询)/GetGpuTimestampNs/Present/SetSwapInterval 转发到 BFA vtable;命名对象(NamedFramebuffer/BlitNamed/GetTextureImage/CopyImageSubData)经 `HandleProvider` + `FramebufferNameProvider`/`TextureNameProvider`/`RenderbufferNameProvider` 把前端 GL name 映射为 BFA handle(Provider 由 FullServerEntry 注入,用前端当前 GLContext 的 GetObjectHandle);`ServerCore` 增加 `SetSessionListener`(session create/destroy 通知),`FullServerEntry` 在 start 时 `Install`、session 变化时更新 current session、destroy 时 `Clear`;`BfaFrontendShimTest` 1/1 通过,BigServerE2E/ClientSessionLifecycle 1/1,真实 DirectGLES Python E2E status=0
- [x] **前端 session 绑定**:`FullServerEntry` 的 session listener 同时用 `GLContextRegistry` 创建/销毁以 BFA session id 为 key 的前端 GLContextSession,并把当前线程 current 指到它;shim 增加 `SessionProvider` 回退(ServerCore 未上报时从前端当前 context 取 session id),使旧前端命令的 current session 与 BFA 对齐
- [x] **FullServer 侧 BFA→旧 `BackendObject`/`gBackendFunctionsTable` shim 剩余覆盖(ABI minor 0.1)**:`bfa.h` vtable 追加 `MultiDrawElementsBaseVertex/MultiDrawArraysIndirectCount/MultiDrawElementsIndirectCount/DrawRangeElementsBaseVertex/DrawElementsInstancedBaseVertex/BaseInstance/BaseVertexBaseInstance/DrawArraysInstancedBaseInstance/GetIntegeri_v/GetInteger64i_v/GetProgramiv`;DirectGLES RealBackend 实现(能真实调用的走 GLES 函数,不能的循环/兜底);`BfaFrontendShim` 增加对应 thunk 并全表赋值;`MakeCurrent` 与 session 绑定经 `pGLContext` 修复(OnSessionChanged/WireDispatchWithSession 同步)
- [ ] DirectVulkan 后端迁移到 BFA vtable(device/sharedgroup/session 三层)
## Phase 4 — 外部协议落地(进行中)
- [x] `MobileGL/MG_Transport/LocalSocketShmTransport.h/.cpp` — v1 transport:AF_UNIX socket connect / bind+listen / accept + 长度前缀字节流收发
- [x] **shm arena**:`OpenSharedMemory`(memfd_create + mmap)/ `ReleaseSharedMemory`;`InProcessTransportTest.LocalSocketShmAllocatesSharedMemory` 3/3 通过
- [x] **shm fd 跨进程传递**:`SendShmHandle` / `RecvShmHandle`(SCM_RIGHTS + 控制消息携带 size);`LocalSocketShmTransfersShmFd` 双向读写验证,InProcessTransportTest 4/4 通过
- [x] **shm payload 回读通路**:`Client::SubmitDataCommand` → batch 携带 shm fd → `ServerCore` 用 `ReceiveShmHandle` 接收并读首字节 → `Response.data_byte` 回显;`ClientShmPayloadTest` 1/1 通过
- [x] transport ops 新增 `ReceiveShmHandle`(ABI minor+0.1 兼容追加)
- [x] `MobileGL/MG_Transport/InProcessTransport.h/.cpp` — 同进程 transport 实现(client/server 配对 + 批消息队列)
- [x] `MobileGL/MG_Transport/TransportInternal.h` — 统一 `MobileGLTransport` 内部完成类型(避免 ODR 冲突)
- [x] `MobileGL/MG_Test/Transport/InProcessTransportTest.cpp` — in-process + LocalSocketShm 往返 + shm arena + fd 传递测试 4/4 通过
- [x] `MobileGL/MG_Client` — Client 命令 API:`InitializeWithTransport` + `SendCommand(sessionId, opcode)`(提交/等待响应)+ 异步 `SubmitCommand` / `WaitResponseForToken`
- [x] `MobileGL/MG_Test/Transport/ClientAsyncBatchTest.cpp` — 8 条命令先全部提交、再按 token 收响应,1/1 通过
- [x] `MobileGL/MG_Test/Transport/ClientServerEndToEndTest.cpp` — Client 命令 → InProcess → ServerCore → VTable → 响应,1/1 通过
- [x] `InProcessTransport::WaitResponses` 改为等待语义(timeoutMs=0 无限等待)
- [x] `MobileGL/MG_Transport/CMakeLists.txt` — `MobileGL_Transport` static library
- [x] `scripts/generate_protocol_fbs.py` → `MobileGL/MG_Protocol/protocol_generated.fbs`(2880 个 `Gl*` payload 表;本次补齐 GLenum*/GLdouble*/GLint64*/GLboolean* 等指针/数组映射)
- [x] `scripts/generate_opcode_table.py` → `MobileGL/MG_Protocol/generated_opcodes.h`(1396 个 GL/EGL opcode + 名称表)
- [x] `MobileGL/MG_Test/Transport/ProtocolOpcodeTest.cpp` — 生成表计数与名称查询 1/1 通过
- [x] `MobileGL/MG_Protocol/wire.fbs` — 最小 wire schema + flatc 生成 `gen/wire_generated.h`(8KB)
- [x] `3rdparty/FlatBuffers/include` — vendored flatbuffers 头(flatc v25.12.19 兼容)
- [x] **Client/ServerCore 改用 FlatBuffers 实际编解码**:`Client::SendCommand` 构建 `Message`;`ServerCore` 解析 `Message` 并按 opcode 分发、构建 `Response`
- [x] **typed payload trampoline 起步**:wire 增加 `ClearColor{red,green,blue,alpha}`;`Client::SendClearColor` + `ServerCore` 解包调 BFA `ClearColor`;`ClientClearColorTest` 1/1 通过(float 字段精确校验)
- [x] **DrawArrays typed payload**:wire 增加 `DrawArrays{mode,first,count}`;`Client::SendDrawArrays` + `ServerCore` 解包调 BFA `DrawArrays` + null adapter 存根;`ClientDrawArraysTest` 1/1 通过
- [x] **ClientWaitSync + Query 命令族**:wire 增加 `ClientWaitSync{sync,flags,timeout}`(Response.sync 回传结果码)+ `BeginTimeElapsedQuery/EndTimeElapsedQuery/DeleteBackendQuery/IsQueryResultAvailable/GetQueryResult64/BeginOcclusionQuery/EndOcclusionQuery/BeginXfbPrimitivesQuery/EndXfbPrimitivesQuery`(Response.query_ns 回传 ns);`Client::*` 系列 API;`ServerCore` 分发到 BFA(glClientWaitSync/glBeginQueryIndexed/glEndQueryIndexed/glDeleteQueries + control opcodes 1'000'020-25);`ClientClientWaitSyncTest` 1/1 + `ClientQueryResultsTest` 1/1(result=0x911B、query=0x7777/0x7778/0x7779、available/ns/end/delete 回查)
- [x] FlatBuffers 迁移后回归:`BigServerE2ETest` 2/2、`ClientServerEndToEndTest` 1/1、`InProcessTransportTest` 2/2、`ProtocolOpcodeTest` 1/1 全部通过
- [x] **完整 API merge 流水线**:`scripts/merge_protocol_fbs.py` 将 2750 个生成 payload 表并入 `protocol.fbs` 的插入点,产出 `protocol_full.fbs`(无重复、flatc 校验通过;`GeneratedPayload` union 因 >255 成员改为 opcode 分发)
- [x] `scripts/generate_dispatch_table.py` → `generated_dispatch.h`(1396 条 opcode→API→payload 表元数据)
- [x] `ProtocolOpcodeTest` 增加 dispatch 元数据校验,2/2 通过
- [x] **完整 source-list 运行时分发(trampoline / dispatch / 分类表)**:`scripts/generate_wire_full_fbs.py` 从 `protocol_generated.fbs` 生成 `wire_full.fbs`(2750 个 `Gen*` payload 表,`namespace MobileGL.Protocol.WireFull`);`wire.fbs` Command 增加 `payload_bytes:[ubyte]`;`scripts/generate_wire_dispatch.py` 生成 `generated_wire_dispatch.h/.cpp`(1396 条 opcode 全覆盖:**1171 supported** → 调用导出 `gl*` entry point(含 stub,按 Definitions.cpp 转发声明),**225 unsupported** → 干净 status=1 分类;未覆盖的多级指针/回调签名在 `generated_wire_dispatch_report.txt` 分类);`ServerCore` 增加 `SetWireDispatch` 回调,`payload_bytes` 走生成分发;`FullServerEntry` 注入 `WireDispatchWithSession`(先按 sessionId 设当前 frontend context,再调 `WireDispatchCall`);Client 侧生成 `generated_wire_client.h`(与 dispatch 同 supportedness 的 per-API `SendGl*` wrappers,基于通用 `SendWirePayload`);`ProtocolDispatchCoverageTest` 校验 1396 全覆盖与 supported/unsupported 计数;`ClientWirePayloadTest` 验证 `payload_bytes` 经 `SendWirePayload` → `ServerCore` 回调链路
- [x] **异步命令提交 + 按 token 等待**(`Client::SubmitCommand` / `WaitResponseForToken`;`ClientAsyncBatchTest` 1/1 通过)
- [x] **BufferRespecify 数据通路**:wire 增加 `BufferRespecify{buffer_handle,size,usage}`;`Client::SendBufferRespecify`(shm 初始数据可选);`ServerCore` 调 BFA `BufferRespecify`(`MobileGLBufferOps` 携带 shm 指针);`ClientBufferRespecifyTest` 1/1 通过(handle/size/usage/首字节 0xAB 精确回查)
- [x] **间接绘制 shm 通路**:wire 增加 `DrawArraysIndirect` / `DrawElementsIndirect`(shm_offset);`Client::SendDrawArraysIndirect/SendDrawElementsIndirect`;`ServerCore` 解包 shm 指针后调 BFA `DrawArraysIndirect/DrawElementsIndirect`;`ClientIndirectDrawsTest` 2/2 通过(mode/type/offset 处首字节精确回查)
- [x] **GetString 字符串返回**:wire `Response` 增加 `string_value`;`Client::SendGetString` + `GetLastResponseString`;`ServerCore` 调 BFA `GetRendererInfo` 并按 `GL_VENDOR/GL_RENDERER/GL_VERSION/GL_SHADING_LANGUAGE_VERSION` 回填;`ClientGetStringTest` 4 项字符串精确校验 1/1 通过
- [x] **TextureRespecify 单级上传**:wire 增加 `TextureRespecify{texture,level,format,type,width,height,depth,data_size}`;`Client::SendTextureRespecify`(shm 像素数据);`ServerCore` 组装 `MobileGLTextureUpload` 调 BFA;真实插件懒建 GL 纹理名并调 `glTexImage2D/3D`;`ClientTextureRespecifyTest` 1/1 通过
- [x] **ReadPixels 服务端→客户端 shm 回读**:wire `Response` 增加 `ret_shm_count`;`LocalSocketShmTransport::WaitResponses` 按 count 接收 SCM_RIGHTS shm fd;`ServerCore` 在 ReadPixels 分支 `OpenSharedMemory` 分配 arena、BFA 回填、`SubmitCommands` 携带 handle;`Client::SendReadPixels` 从响应 handle 拷回像素;`ClientReadPixelsTest` 1/1 通过(0xDEADBEEF 精确回查)
- [x] **TextureSubImage 子图像上传**:wire 增加 `TextureSubImage{texture,level,format,type,width,height,depth,data_size}`;`Client::SendTextureSubImage`(shm 像素数据);`ServerCore` 调 BFA `TextureSubImage`;真实插件懒建纹理并调 `glTexSubImage2D/3D`;`ClientTextureSubImageTest` 1/1 通过
- [x] **BufferReadbackFromGpu 服务端→客户端 shm 回读**:wire 增加 `BufferReadbackFromGpu{buffer_handle,offset,size}`;`Client::SendBufferReadbackFromGpu`;`ServerCore` 分配响应 shm 调 BFA bool;真实插件用 `glMapBufferRange(GL_MAP_READ_BIT)` 拷回;`ClientBufferReadbackTest` 1/1 通过(0x12345678 精确回查)
- [x] **Map/Unmap 客户端缓冲映射**:wire 增加 `MapBufferRange{buffer_handle,offset,size,access}` + `UnmapBuffer{buffer_handle,offset,size}`;`Client::MapBufferRange` 经服务端→客户端 shm 返回可写映射指针,`Client::UnmapBuffer` 用新 shm 把修改交回服务端(ServerCore 调 BFA `BufferReadbackFromGpu`/`BufferSubData`);`ClientMapUnmapTest` 1/1 通过(映射读回 0x10203040 → 改写 0x99 → unmap 后服务端收到 0x99)
- [x] **批量零拷贝(Message 多命令帧)**:`wire.fbs Message` 增加 `commands:[Command]`(保持既有 `CreateMessage(command, shm_count)` 兼容);`Client::SubmitDataCommandBatch` 一次 Message 携带 N 条 Command + 单一 shm handle;`ServerCore` 将单命令处理提取为 `processSingle` lambda,批量帧逐条执行并为每条发独立 Response;`ShmPayloadBenchmark` 的 `batch/large-batch` 模式改用该路径(待编译回归实测)
- [x] **Token 透传**:`Command.token` / `Response.token`;`Client::SendCommand` 校验回显 token;Python 跨进程 E2E 仍 status=0
- [x] **shm payload 回读**:`ClientShmPayloadTest` 已验证(0xAB 写入 → fd → server 读回 → data_byte=0xAB)
- [x] **会话生命周期**:`control.h` 定义 `SessionCreate/Destroy` 控制 opcode;`Client::SubmitSessionControl` + `ServerCore` 调 `OnSessionCreated/OnSessionDestroyed`;ServerCore 维护 live-session 集合,destroy 后同一 session 命令被拒绝(status!=0);`ClientSessionLifecycleTest` 1/1 通过
- [x] **Token↔session 完整失效模型(多 socket/超时)**:Client 侧 `PendingToken{sessionId}` 表 + 单调不复用 token;`WaitResponseForToken` 校验 response.session_id,超时/失效后删除 token,迟到响应按“token 已不在 pending 表”丢弃;`InvalidateSession` 清除该 session 全部 pending token;`SubmitSessionControl(destroy)` 自动失效;`Response.session_id` 回显;`LocalSocketShmTransport::WaitResponses` 用 `poll` 实现 timeoutMs;`InProcessTransport` 已有 deadline;`ClientTokenSessionTest` 2/2(失效丢弃迟到响应 + 超时失效)
## Phase 5 — Plugin 化集成(进行中)
- [x] `MobileGL/MG_FullServer/UtilRuntimeLoader.h/.cpp` — dlopen `MobileGL_UtilRuntime.so` + ABI 握手
- [x] `MobileGL/MG_FullServer/BackendPluginLoader.h/.cpp` — dlopen BackendObject + manifest 协商 + Create
- [x] `MobileGL/MG_FullServer/BackendHost.h/.cpp` — Host vtable 注入
- [x] ~~`MobileGL/MG_FullServer/Main.cpp`~~ — 启动流程接线(UtilRuntime→BackendPlugin→Create→Initialize→Shutdown);**已移除**(scaffold 遗留;FullServer 以 SHARED .so + C ABI 交付,启动由 `FullServerEntry` 承担)
- [x] **插件生命周期链路(组件级验证)**:`UtilRuntimeLoader` / `BackendPluginLoader` / `ServerCore` 在 `libMobileGL_FullServer.so` 内编译通过;`BigServerE2ETest` 覆盖 Create→Initialize→command dispatch→Shutdown
- [x] **DrawElements + shm indices(零拷贝 draw 数据路径)**:wire 增加 `DrawElements{mode,count,type,indices_offset}`;`Client::SendDrawElements` 携带 shm fd;`ServerCore` 接收并映射后把 indices 指针传给 BFA `DrawElements`;`ClientDrawElementsShmTest` 1/1 通过(offset=1 读到 0x2B)
- [x] **BufferSubData + shm data(buffer 数据通路)**:wire 增加 `BufferSubData{buffer_handle,offset,size}`;`Client::SendBufferSubData` 携带 shm fd;`ServerCore` 把 shm 指针传给 BFA `BufferSubData`;`ClientBufferSubDataShmTest` 1/1 通过(handle/offset/size/首字节 0x44 精确回查)
- [x] **后续 16 类命令已接入(Client*Test 均 1/1)**:`MemoryBarrier` / `MemoryBarrierByRegion` / `PatchParameteri` / `GenerateMipmap` / `DispatchCompute` / `DispatchComputeIndirect` / `Begin/End/Pause/Resume/BindTransformFeedback` / `BlitFramebuffer` / `SwapBuffers` / `DrawArraysInstanced` / `DrawElementsInstanced` / `DrawRangeElements` / `FenceSync`(handle 回传) / `DeleteSync`(handle) / `WaitSync` —— 全部具备 wire 表 + Client API + ServerCore 分发 + null adapter 存根
- [x] DirectGLES / DirectVulkan null adapter 提供 `Initialize/Shutdown/Display/SharedGroup/Session/Clear/ClearColor/DrawArrays/DrawArraysInstanced/DrawElements/DrawElementsInstanced/DrawRangeElements/BufferSubData/MemoryBarrier/MemoryBarrierByRegion/PatchParameteri/GenerateMipmap/DispatchCompute/DispatchComputeIndirect/Begin/End/Pause/Resume/BindTransformFeedback/BlitFramebuffer/SwapBuffers/FenceSync/DeleteSync/WaitSync` 存根
- [x] **BigServer 全链路 E2E(in-process)**:Client 命令 → InProcessTransport → `FullServer::ServerCore` → Backend VTable → Response → Client;`BigServerE2ETest` 1/1 通过
- [x] **BigServer 全链路 E2E(LocalSocketShm)**:client socket → server accept → `ServerCore` 分发 → 响应返回 client;`BigServerE2ETest` 2/2 通过
- [x] ServerCore 分发改为使用生成 opcode 表(`MobileGLOpcode::glClear`),BigServerE2E 通过
- [x] **BigServer 全链路 E2E(socket transport + FlatBuffers 解码)**:`BigServerE2ETest.LocalSocketShmServerCoreE2E` 覆盖 LocalSocketShm 连接 → FlatBuffers SessionCreate/glClear 解码 → ServerCore → BFA VTable → Response,1/1 通过(另有 InProcessE2E 1/1)
## Phase 6 — 正确性 / 性能 / 平台
- [x] 多 Session / 多 Display / share group 回归:`ContextRegistryTest` 6/6 通过(含跨 session 对象可见性、不同 Display 分组隔离)
- [x] **真实 EGL/GLES 平台初验**:`BackendObject_DirectGLES.so`(自包含 EGL/GLES 加载)经 `libMobileGL_FullServer.so` 的 socket 路径创建真实 session;Python 端 `GetString(GL_VENDOR)` 返回 `NVIDIA Corporation`(真实驱动初始化成功;surfaceless/默认 EGL display 路径工作)
- [x] **平台环境探测**:`DISPLAY=:0`、`WAYLAND_DISPLAY=wayland-0`;`vulkaninfo --summary`:Vulkan 1.4.341、NVIDIA 独显(vendorID 0x10de / deviceID 0x21c4 / driver 610.57.4.0),`VK_KHR_xcb_surface`、`VK_KHR_wayland_surface`、`VK_KHR_surface` 可用;`/usr/share/vulkan/icd.d/` 含 nvidia/lvp/llvmpipe 等 ICD(真实 X11/Wayland C/S Surface 有硬件基础,DirectVulkan 插件仍是 null 存根待迁移)
- [x] **EGL pbuffer surface 生命周期**:wire 增加 `EglCreatePbufferSurface{display,surface,width,height}` + `EglDestroySurface{display,surface}`;`Client::SendEglCreatePbufferSurface/SendEglDestroySurface`;`ServerCore` 分发到 BFA `CreatePbufferSurface/ReleaseEGLSurface`(按 live display 校验);真实插件已实现 pbuffer surface 创建/释放;`ClientEglSurfaceTest` 1/1 通过(display/surface/64x48/释放回查)
- [x] **EGL MakeCurrent / SwapInterval / ResizeSurface**:wire 增加 `EglMakeCurrent{session,draw,read}` + `EglSwapInterval{interval}` + `EglResizeSurface{display,surface,width,height}`;Client/ServerCore 分发到 BFA `MakeEGLCurrent/SetSwapInterval/ResizeSurface`(按 live session/display 校验);`ClientEglCommandsTest` 1/1 通过
- [x] **命令往返基准**:`MobileGL/MG_Benchmark/Transport/CsRoundTripBench.cpp`(mg_bench 原生 C++:FlatBuffers → socket → FullServer.so → backend;原 `scripts/bench_cs_e2e.py` 已并入并删除),含 SessionCreate/Destroy 生命周期,100 次往返 avg 30.5µs / min 25.2µs / max 107.5µs(null backend);**真实 DirectGLES 插件重测**:avg 62.5µs / min 23.9µs / max 1644.1µs
- [x] **shm payload 零拷贝基准**:`ShmPayloadBenchmark`(C++:SessionCreate → 100× SubmitDataCommand+fd 回读 → destroy),avg 34.1µs / min 25.8µs / max 83.4µs(含 SCM_RIGHTS fd + mmap 回读);**当前重测**:avg 36.1µs / min 23.8µs / max 185.2µs(serverOk=1)
- [x] **命令批处理基准(batch 提交 vs 逐条)**:`CsRoundTripBench` 新增 `CsBatchRoundTrip`(16/64/256 批量发送后按 token 收响应);`ShmPayloadBenchmark` 支持 `batch` / `large` / `large-batch` 模式(64 条提交后批量等待 / 4MiB payload shm),输出 per-command/per-batch avg/min/max(待 Linux 构建回归记录实测值)
- [x] **平台 Surface(X11/Win32/Android 条件代码)**:`RealBackend` 增加 `SurfaceByName` handle 映射;`CreateWindowSurfaceBackend` 在 `_WIN32`/`__ANDROID__`/`__APPLE__`/`__linux__` 下走 `eglCreatePlatformWindowSurface` 或 `eglCreateWindowSurface`(Linux X11 用 `EGLNativeWindowType` 从 `nativeWindow` 转换);`ReleaseEGLSurface/ReleaseEGLResources/OnDisplayDestroyed/Shutdown` 同步清理 handle 表面;`SwapBuffers` 按 draw handle 选择表面(Linux 上无真窗口验证,仅代码路径)
## 下一步
1. **Phase 3(用户决策:本 session 跳过 DirectVulkan)**:DirectGLES 真实渲染层已接入;DirectVulkan 仍为 null 存根待后续迁移。
2. Phase 4 本次完成:全量 source-list 运行时分发 codegen(651/1396 supported)与 Token↔session 失效模型;剩余为把 unsupported 签名(多级指针/回调/Get* 输出)逐步补进生成器,以及 Query/Sync session-private 状态层。
3. Phase 6 本次完成:Win32/Android Surface 条件代码 + batch/大 payload 基准;待 Linux 构建回归后记录实测值。
4. 每完成一块:更新本文件 + 提交(`[Feat] (Scope): Subject`);单线串行推进,不使用 subagent 并行。
@@ -9,8 +9,8 @@
- **窗口开了等于没开**:同一台设备、同一帧、同一 101,421,396 B staged,`MOBILEGL_IPC_CREATE_WINDOW=4` - **窗口开了等于没开**:同一台设备、同一帧、同一 101,421,396 B staged,`MOBILEGL_IPC_CREATE_WINDOW=4`
与 `=1` 的 create 行都是 **4,536 次等待**,墙钟都是 **28.64 s**(handoff 的 pre-window 基线是 31.3 s)。 与 `=1` 的 create 行都是 **4,536 次等待**,墙钟都是 **28.64 s**(handoff 的 pre-window 基线是 31.3 s)。
临时计数器给出的形态是:`pushed=24 blocked=4,476 took=20 readfail=8,951 pending=4`——**drain 读不回来**。 临时计数器给出的形态是:`pushed=24 blocked=4,476 took=20 readfail=8,951 pending=4`——**drain 读不回来**。
- **不是调参问题**:回复池 8 槽,而这一帧发出 **59,673 条带回复的记录**(服务端对每条 kReplySlot 记录都回, - **不是调参问题**:回复池 8 槽,而这一帧发出 **55,903 条带回复的记录**(服务端对每条 kReplySlot 记录都回,
不管客户端要不要),所以一条答案在 **8 条回复**之后就被覆盖,等于 **0.61 个 create**。任何深度的窗口都读不回来。 不管客户端要不要),所以一条答案在 **8 条回复**之后就被覆盖,等于 **0.65 个 create**。任何深度的窗口都读不回来。
- **顺带修掉一个真 bug**:`StreamLink::ReadReply` 只认「最新一条」(单槽),违背 `ILink::ReadReply(seq)` - **顺带修掉一个真 bug**:`StreamLink::ReadReply` 只认「最新一条」(单槽),违背 `ILink::ReadReply(seq)`
的按 seq 读取语义。已改成一个 8 槽环 + 用例。 的按 seq 读取语义。已改成一个 8 槽环 + 用例。
- **默认关掉**:`MOBILEGL_IPC_CREATE_WINDOW` 默认 1。窗口开着不只是白费,它会让**被拒绝的 create 留在「已发布」状态** - **默认关掉**:`MOBILEGL_IPC_CREATE_WINDOW` 默认 1。窗口开着不只是白费,它会让**被拒绝的 create 留在「已发布」状态**
@@ -23,10 +23,13 @@
| handoff 基线(无窗口的二进制) | — | 4,536 | 4,536 | 31.26 s | `logs/mcx.client` | | handoff 基线(无窗口的二进制) | — | 4,536 | 4,536 | 31.26 s | `logs/mcx.client` |
| 窗口 4 | 4 | 4,536 | **4,536** | **28.64 s** | `logs/mcx-fix4.client` | | 窗口 4 | 4 | 4,536 | **4,536** | **28.64 s** | `logs/mcx-fix4.client` |
| 窗口 1(负控) | 1 | 4,536 | **4,536** | **28.64 s** | `logs/mcx-fix1.client` | | 窗口 1(负控) | 1 | 4,536 | **4,536** | **28.64 s** | `logs/mcx-fix1.client` |
| **默认(本轮收尾的 HEAD,窗口 1)** | 1 | 4,536 | **4,536** | 30.79 s | `logs/mcx-final.client` |
`by_op 2` 数的是**走了阻塞路径的 create**(`LinkMetricsBeginReply(ownsReplySlot, op)`, `by_op 2` 数的是**走了阻塞路径的 create**(`LinkMetricsBeginReply(ownsReplySlot, op)`,
`ownsReplySlot = rowCarriesReplySlot && wantReply`,`ClientSession.cpp:1840/1883`)。它没动,就是「一条都没延后」。 `ownsReplySlot = rowCarriesReplySlot && wantReply`,`ClientSession.cpp:1840/1883`)。它没动,就是「一条都没延后」。
两臂的 `frame-sent` 全表逐 op 相同(4,536 / 20,633 / 3,770 / 18,056 / 12,671 …),也就是**记录一条没少发**。 两臂的 `frame-sent` 全表逐 op 相同(4,536 / 20,633 / 3,770 / 18,056 / 12,671 …),也就是**记录一条没少发**;
收尾那一轮(默认值,`mcx-final`)的 `frame-sent` 与它们**逐字节相同**,墙钟的 30.79 s 在 handoff-2 §4.3 说的
「单次墙钟差含数秒噪声」带内——三臂的墙钟差(28.64 / 28.64 / 30.79)没有一个超出噪声。
窗口确实进去过——临时行(每 500 条打一次)在窗口 4 下的读数: 窗口确实进去过——临时行(每 500 条打一次)在窗口 4 下的读数:
@@ -38,28 +41,34 @@ P12diag create=4501 cfg=4 eff=4 suspects=0 refusals=0 pending=4 pushed=24 blocke
`pending` 从第 500 条起**一直钉在 4**,`refusals=0`(一条答案都没读到过),`readfail` 约每条 create 涨 2 `pending` 从第 500 条起**一直钉在 4**,`refusals=0`(一条答案都没读到过),`readfail` 约每条 create 涨 2
(非阻塞 poll + 阻塞 drain 各失败一次)。 (非阻塞 poll + 阻塞 drain 各失败一次)。
## 2. 根因:回复池 8 槽 vs 一帧 59,673 条回复 ## 2. 根因:回复池 8 槽 vs 一帧 55,903 条回复
答案只在**它的槽没被复用**之前可读(`ReplySlotPool`,`kDefaultReplySlotCount = 8`, 答案只在**它的槽没被复用**之前可读(`ReplySlotPool`,`kDefaultReplySlotCount = 8`,
`Transport/ReplySlot.h:111`)。而这一帧发回复的记录数是: `Transport/ReplySlot.h:111`)。而这一帧发回复的记录数是(**只数带 `kReplySlot` 的行**——
`MG_Pipe/generated/PipeWire.inc:177-179` 的 flags 列,op 4 `ResourceDestroy` 是 `kNone`,
`PostReply` 对它直接 Fatal,从来不回;本文第一版把它的 3,770 条算了进来,审查纠正为下表):
| 行 | 条数 | 为什么回 | | 行 | 条数 | 为什么回 |
|---|---|---| |---|---|---|
| 2 `ResourceCreate` | 4,536 | 等 | | 2 `ResourceCreate` | 4,536 | 等 |
| 3 `ResourceRespecify` | 20,633 | **不等也给**(首用确认后 fire-and-forget) | | 3 `ResourceRespecify` | 20,633 | **不等也给**(首用确认后 fire-and-forget) |
| 47 `SetTextureParams` | 18,056 | **不等也给** | | 47 `SetTextureParams` | 18,056 | **不等也给** |
| 48 `ResourceSubData` + 4 | 16,441 | **不等也给** | | 48 `ResourceSubData` | 12,671 | **不等也给** |
| 5 / 9 等 | 7 | 等 | | 5 / 9 等 | 7 | 等 |
| **合计** | **59,673** | | | **合计** | **55,903** | |
服务端**无法知道**客户端要不要这条答案——`ClientSession.cpp:1897-1900` 原文:「The server posts either way, 服务端**无法知道**客户端要不要这条答案——`ClientSession.cpp:1897-1900` 原文:「The server posts either way,
so the wire is unchanged and the row keeps its flag」。于是池子一帧churn **7,459 次**,两条 create 之间平均夹 so the wire is unchanged and the row keeps its flag」。于是池子一帧 churn **6,988 次**,两条 create 之间平均夹
**13.2 条回复**,而一条答案只活得下 **8 条**: **12.3 条回复**,而一条答案只活得下 **8 条**:
8 / 13.2 = 0.61 个 create 8 / 12.3 = 0.65 个 create
**所以窗口的失败不是「慢」,是「读不到」。** 1 深度的窗口就是阻塞路径本身。 **所以窗口的失败不是「慢」,是「读不到」。** 1 深度的窗口就是阻塞路径本身。
> **⚠️ 本节后来被 §8 部分更正。** 池深度是**加剧因素**而不是约束:把一帧回包从 55,903 砍到 4,543
> 之后,drain 依然一条都读不回来(readfail 8,951 → 8,872)。真正的约束是 §8 的
> 「有界缓冲 + 严格 FIFO + 读失败无出路」。本节的数字仍然有效,结论不完整。
## 3. 顺带发现并修掉:`StreamLink::ReadReply` 违背了自己的接口 ## 3. 顺带发现并修掉:`StreamLink::ReadReply` 违背了自己的接口
`ILink::ReadReply`(`Transport/ILink.h:285`)的签名是**按 seq 读**;`ShmLink` 用 `ReplySlotPool` 实现它, `ILink::ReadReply`(`Transport/ILink.h:285`)的签名是**按 seq 读**;`ShmLink` 用 `ReplySlotPool` 实现它,
@@ -112,12 +121,207 @@ if (x.replySeq != seq) return ... MOBILEGL_ERR_PROTOCOL_MISMATCH; // 等的是
要让延后的答案活下来,只有两条路,**都是协议面而不是调参**: 要让延后的答案活下来,只有两条路,**都是协议面而不是调参**:
1. **加深回复池**:`ReplySlotCount` 在 Hello 里协商(`ClientSession.cpp:957` / `ServerSession.cpp:745`), 1. **加深回复池**:`ReplySlotCount` 在 Hello 里协商(`ClientSession.cpp:957` / `ServerSession.cpp:745`),
两端一致即可改。需要的深度 \>= 两条 create 之间的回复数(本帧 13.2)乘以窗口深度,即 4 深度要 ~53 槽; 两端一致即可改。需要的深度 \>= 两条 create 之间的回复数(本帧 12.3)乘以窗口深度,即 4 深度要 ~49 槽;
而 `ReplyBytes` 固定 16 MiB 时槽会变小,`ReadPixels` 的 `ReplyCanHold` 会先撞墙,所以要一起抬 `ReplyBytes`。 而 `ReplyBytes` 固定 16 MiB 时槽会变小(16 MiB / 64 ≈ 256 KiB),`ReadPixels` 的 `ReplyCanHold`
2. **让客户端能说「这条别回」**:四个 Bool 行(create/respecify/params/sub-data)目前服务端一律回; 会先撞墙,所以要一起抬 `ReplyBytes`(W=4 保 2 MiB 上限约需 128 MiB)。**注意这是 8× 常驻内存**,
一个 record flag 就能把 59,673 砍到 ~4,543,那时 8 槽够用。这是 wire 改动,两端都要动。 而且评审指出服务端 SEG_REPLY 的实际分配路径**没人读过**——走这条之前先读它。
2. **让服务端别回那些没人会读的答案**:四个 Bool 行(create/respecify/params/sub-data)目前一律回,
其中约 51,000 条的答案是**没有人会读**的。砍到 ~4,543 之后两条 create 之间只剩 ~1 条回复,8 槽够用。
## 8. 复算 **判据必须是「这条的答案永远不会被读」,不是「fire-and-forget」。** 这两者今天在 4 个站点里 3 个重合,
**在最重要的那一个上正好相反**:window 延后的那些 create **正是** `wantReply=false`,而 §1 的 drain
读的就是它们。按字面实现会让窗口从「读不回来」变成「根本没得读」,而且连 `readfail` 这个唯一能诊断它的
计数器一起消失——不会崩,只会静默退化。(这条是独立评审抓到的;本页 §7 的第一版写法就是那个错判据。)
三件已经核过的事:
- **位有空位**:`MGPWireRecHeader::Flags` 是链路 framing 空间 `RingRecordFlags`(**不是** `MGPipeCallFlags`),
`Ring.h:281-285` 用掉 bit 0-4,**bit 5 空**(`PipeWire.inc:35-65` 的对照表自己写着「bit 5 kOptional vs(无)」)。
- **wire fingerprint 不动**:`WireFingerprint()` 混的是 payload 布局 digest + PipeCalls.def 的 catalogue
digest + 渲染状态 + OpCount,加一个 ring 位三个都不动 ⇒ **不必 bump `MOBILEGL_PROTOCOL_CONTROL_REVISION`**。
但 `PipeWireCodec.cpp:106` / `:142-145` 与 `RingTest.cpp:740` 三条 `static_assert` **会红**——那是故意的
绊线(新 ring 位正好别名 `kOptional`)。
- **两个方向都退化成今天的行为**(旧端忽略 bit 5 照旧回包;旧客户端从不设位)⇒ 它**不是** handoff-2 §3.2
那种「不升级就会坏」的协议面,而是**「不两端都升就不会生效」**的协议面——便宜一档,客户端可以先落。
还有一处**必须同改**:`LinkMetricsBeginReply` 计的是 `ownsReplySlot`(`ClientSession.cpp:1883`),window
生效后 **`by_op 2` 会掉到 ~0**,而 §1 正是教人用 `by_op 2` 判断窗口有没有生效——它会变成**假绿**。
验证这个提案要另加「服务端为这条 op 回了多少次」的计数。
(本节的两条路都经过一次独立评审。评审指出一处**未实测**:`StreamLink::PostReply` 把 `SendProgress()`
搭在回包上(`StreamLink.cpp:577`),跳过回包会把进度粒度从「每条一次」降到「>= 64 条或 >= 1 ms 一次」
(`:564-571`)——水位仍独立推进,但 barrier 的平均多等量没人算过。)
## 8. 更正(同日晚,实现 no-reply 位之后):池深度**不是**约束
§2 把「8 槽池 vs 55,903 条回复」写成了根因。**实测否掉了这个诊断的一半。** 后来按 §7 的第 2 条路
实现了那个 no-reply 位(服务端跳过没人读的答案),真机上服务端日志确认它生效:
服务端:decisions=50001(跳过) answered=4521(回包)
客户端:收到的 Reply 帧 seen=4501, latest seq=97181
也就是说一帧的回包从 55,903 降到 ~4,543(−92%),池子不再被冲刷。**而窗口的 drain 依然一条都读不回来:**
P12win call=4501 cfg=2 eff=2 pending=2 taken=62 pushed=64 blocked=4436 waitfail=65 readfail=8872
P12miss n=1 want=310 replySeq=1504 ring=[1175..1504] slots=8
P12miss n=9001 want=310 replySeq=102915 ring=[102866..102915] slots=8
**want=310 每一次都是同一个数**:窗口是按序的,队头那条的答案早就被有界缓冲覆盖掉了,而 drain 只会
**永远重试同一个队头**。于是 taken 停在 62、pending 钉在 2、readfail 每条 create 涨 2、suspects 恒为 0。
**真正的根因是「有界缓冲 + 严格 FIFO + 读失败无出路」三者相乘**,不是池子有多深:
- 回复通道在任何实现下都是有界的(shm 是 8 槽池、stream 是我那轮改的 8 帧环),覆盖是设计的一部分;
- 窗口只读队头,且读失败时**只记账不放弃**(`if (!session.ReadReply(...)) return;`);
- 于是 4,536 条延后答案里**只要有任意一条**在被读之前被覆盖,窗口就永久卡死,之后每条 create 都走阻塞路径;
- 概率上这是必然事件,而不是小概率——这也解释了为什么去掉 50,001 条回复只让 readfail 从 8,951 动到 8,872(−0.9%):
冲刷速率降了两个数量级,但「至少丢一条」的概率仍然是 1。
**要修的话是一个明确的形状**(本轮按 goal 的止损条件停在这里,没有实现):队头的答案读不回来时
**放弃它**——`MGPipeNoteHandleUnpublished` + `NoteCreateSuspect` + 弹出该条目——也就是把 DECLINE 的
处理路径复用到「不知道」这个结果上。这样窗口自愈(该对象回到阻塞路径,下一次 create 把真相带回来),
代价是丢过答案的对象变慢,而不再是把整行拖死。它需要一个自己的门:**读失败必须让窗口继续前进**。
顺带记两条本轮得到的事实:
1. **no-reply 位本身是好的,而且两端都验证过**:服务端跳过 50,001 条、回 4,521 条;客户端的 `by_op 2`
随之变成「drain 的阻塞次数 + fallback 次数」,`frame-sent` 逐 op 不变。它救不了窗口,但它把
「服务端为每条 kReplySlot 记录都回」这件事变成了可关的——每帧少 ~102,000 次 `sendmsg`。
2. **两端必须都升才生效**:客户端先落、服务端不升时,行为与改前逐字节相同(旧端忽略 bit 5 照旧回包)——
这正是 B6 说的那一档,本轮在真机上先撞到了一次。
## 9. 第 1、2 步落地与实测:预算也不够,缺的是「保留」
按 §8 的次序做了两步并上真机。
**第 1 步(让回包失败可归因)**:`ReplyPool` 现在有 `PostedReplies()`/`FailedReplies()`,非 OK 的返回不再被吞
(原来只检查 `BUFFER_TOO_SMALL`,`TRANSPORT_CLOSED` 静默消失)。实测:
服务端 P12post posted=4501 failed=0
**⇒「答案没送到」被排除**:服务端 `answered` 与客户端 `seen` 的那 20 条差额是两端采样时刻不同,不是丢包。
**第 2 步(residency budget)**:客户端数「自最老窗口条目 push 以来发出了多少条带 `kReplySlot` 的记录」
(`ClientSession::ReplyPostings()`),逼近 8 就强制阻塞取回。实测:
P12win call=4501 cfg=2 eff=2 pending=2 taken=63 pushed=65 blocked=4435 budget=4451 readfail=8872 posts=54377
kind=frame-op frame=14 wait_replies=9078 by_op=2=9071 墙钟 27.87 s
`budget=4451`——预算在**几乎每一条 create** 上都判超支,于是窗口几乎不再延后(`pushed=65`),而 drain 依然
读不回来(`taken=63`、`readfail=8872`)。**预算无效,且原因是结构性的:**
1. **窗口只在 create 到达时才有机会动作。** 两条 create 之间客户端可以发出上千条记录——实测第一次读失败时
回复环已经是 `[1175..1504]`,而队头是 **seq 310**;中间那段没有任何人看窗口。
2. **挤掉延后答案的不是客户端发了什么,是服务端回了什么。** 服务端是落后的一侧(每次唤醒 ~5 ms 回一条,
客户端一路跑到前面),所以那段时间到达的回复是它**对更早那批 create 的迟到答案**,它们先把 8 个槽占满。
3. **所以这个判据在构造上就太晚**:它在下一条 create 才被问到,而那时答案早就没了。收紧常数只会让延后彻底消失
(`pushed=65` 就是那个样子),不会有别的结果。
**结论(本轮最终认识):延后要成立,客户端必须「保留」它延后的答案。** 回复缓冲按**条数**有界(8),而客户端
**无法**约束服务端在它两条 create 之间会回多少条答案——所以「指望缓冲里还有」不是策略,是一场客户端必输的竞争。
能工作的形状是**保留**:读线程把「还没被取走」的那几个 seq 的答案留着(同时只有个位数),取走即丢,
读不到就**报一次丢失**而不是无限重试。那是传输层改动(`StreamLink` 的环 → 带上限与丢失计数的保留表),
也是下一步该做的。
**两步都留在树里**:第 1 步是净收益;第 2 步是安全方向(只会让窗口退化成不延后=pre-window 形状),
而且它用的时钟 `ReplyPostings()` 正是保留方案要用的。
## 10. 第 0 步实验:把 `StreamLink` 的环从 8 放到 1024 —— 诊断确认
§9 的结论是「延后要成立必须保留」。在写保留表之前先做了一个**一行实验**把这句话证死:把
`StreamLink::kReplyRing` 从 8 改成 1024(其余一切不动),同一个负载帧:
| | 环 = 8(现状) | 环 = 1024(实验) |
|---|---|---|
| `readfail` | 8,872 | **0** |
| `taken` | 63 | **4,499 / 4,500** |
| `blocked`(回退阻塞路径) | 4,435 | **0** |
| `by_op 2` | 9,071 | **3,443** |
| 墙钟 | 27.9 s | **23.04 s** |
| `frame-sent` | create 4,536 / records 103,097 | 逐 op 相同 |
**结论一:唯一的原因就是淘汰。** 环够深,延后的答案**每一个**都读回来了(4,499/4,500),一次都没有回退到
阻塞路径。§8 那个 `want=310` 的楔子、§9 那个 `budget=4451` 的无效预算,都是「8 个位置不够」这一个事实的两种表现。
**结论二:现在刹车的是预算,不是缓冲。** `by_op 2 = 3,443` 恰好等于 `budget` 触发次数(3,395 量级)——
也就是**每一条被预算强制提前取回的答案,都是一次真实的阻塞等待**。预算的常数是 7(按 8 槽池定的),
而实验里缓冲有 1024 深,于是预算变成了唯一的节流阀,墙钟只从 27.9 s 降到 23.0 s。
**这对设计意味着什么**:保留表落地之后,正确性不再依赖「答案在缓冲里活多久」——**答案被持有到被读走为止**。
于是预算不该再按 8 槽池定,而应当按**保留容量**定(或者干脆由「保留即安全」取代)。
按 `by_op 2 ≈ records / W` 推算,W=2 时应是 ~2,268 次等待、墙钟 ~15 s——**正是 goal 里那条 15-16 s 的判据**。
实验状态已还原(环回到 8、探针全部删除),四个车道 172+13+22+103 全绿。
## 11. 第 0b 步:预算关掉 + 环 1024 —— 收益是量出来的,不是外推的
§10 证明「环够深,延后的答案就都读得回来」,但那一轮 `by_op 2 = 3,443` 里绝大多数是**预算**触发的
(3,395),所以「W 变小能不能换来墙钟」还没答。于是再做一次一行实验:**环 1024 + 把预算关掉**
(`kCreateReplyResidency` 抬到不可能达到),W=2 与 W=4 各跑一轮:
| 臂 | waits | rtt_mean | `by_op 2` | **墙钟** |
|---|---|---|---|---|
| W=1(现默认) | 4,543 | 5,672 µs | 4,536 | 28.66 s |
| 预算开 + 环 8 | 9,078 | 2,598 µs | 9,071 | 27.04 s |
| 环 1024 + 预算 7 | 3,450 | 5,367 µs | 3,443 | 23.04 s |
| **环 1024 + 预算关,W=2** | **2,560** | **4,916 µs** | **2,553** | **16.80 s** |
| **环 1024 + 预算关,W=4** | **1,691** | **4,224 µs** | **1,684** | **11.45 s** |
(W=4 那轮的窗口读数:`taken=4498/4500 pushed=4500 blocked=0 readfail=0`。)
**结论一:分水岭答了,而且是好的一侧。** 等待数减半/减到 1/2.7,墙钟跟着减半/减到 1/2.5,
而 **`rtt_mean` 没有变大**(4,916 / 4,224 µs,比基线的 5,672 µs 还低)。这说明那 ~5 ms 是**唤醒往返**,
而且**服务端一次唤醒吃掉一整批**——所以 W 深一档就少一档唤醒,等待数与墙钟同步下降。
(审计把这条列为「仓库里判不出来、只有真机能答」的分水岭,它同时也是「这件事值不值得做」的分水岭。)
**结论二:收益比 handoff 的地板还低。** handoff §0.4 估计「窗口生效后 15-20 s」,而那把客户端 CPU(~13.4 s)
当成与等待**相加**;实测这个帧是等待主导的,等待摊薄之后 W=4 到 **11.45 s**——比估计的地板还低 3.5 s。
**注意 1024 是替身,不是设计。** 它能工作只因为「这个负载下 1024 恰好够深」;1024 个条目最坏是 ~2 GiB
(`ReadPixels` 的答案可到 2 MiB),审计已点名。**保留表给的正是同一个性质(答案还在)而有界**,
所以这一步的结论是「按审计的形状去实现」,而不是「把环改成 1024」。
实验状态已还原(环回 8、预算回 7、探针删除),172 + 13 全绿。
**顺带更正 §7 的第 1 条路**(审计 F15):在 stream 臂上 `SEG_REPLY` / Hello 的 `ReplySlotCount` **与答案无关**
——答案走 Reply 帧、`StreamLink::ReadReply` 读客户端自己的 store,池只用来给 `MaxReplyBytes()` 定尺寸。
所以「加深池子 + 抬 `ReplyBytes`」根本没有针对实测那条臂,别为它付 8× 常驻内存。
## 12. 落地:保留表上线,默认翻到 2,真机 28.66 s → 16.52 s
按审计的形状实现(`ILink::DeclareReplyRead` + `LinkCapabilities::RetainsReplies`;`StreamLink` 的环 →
**按声明的保留表**:单调白名单 + 游标、取走即删、触顶具名 Fatal、Detach 清空;删掉 residency budget;
`CreateWindowEffective()` 在不保留答案的链路上强制为 1;窗口退休分支补一次 drain)。
**真机(两个二进制都重出,负载帧,`frame-sent 2=` 全程 4,536 不变):**
| 臂 | waits | `by_op 2` | 墙钟 |
|---|---|---|---|
| 窗口 1(R-5 的形状) | 4,543 | 4,536 | 28.66 s |
| 窗口 2(显式) | 2,507 | 2,500 | 17.27 s |
| **窗口 2(出厂默认,无覆盖)** | 2,570 | 2,563 | **16.52 s** |
| 窗口 4 | 1,651 | 1,644 | 11.02 s |
| **窗口 2 + 旧服务端(不认 no-reply 位)** | 2,670 | 2,663 | **16.38 s** |
**版本偏斜那一轮是审计点名的必测项,它过了**:旧服务端照回 ~55,903 条/帧,客户端的白名单把这些
**没人声明**的答案在到达时丢弃(`SkippedUnwanted` 增长而不是保留表增长),延后的答案照旧读得回来,
整轮**零 Fatal**。这正是「按声明保留」相对「全保留 + 淘汰」的那个差别。
**门**(172 + 15 全绿):
- `StreamLinkTest.ADeclaredAnswerSurvivesFarMoreInterveningAnswersThanAnyFixedBuffer` —— **已证明能红**:
把存储退回「按到达保留、只留 8 条」的环语义,它立刻以「the declared answer did not survive 64
intervening ones」失败。这就是把环=1024 那个替身换成有界机制的那条界线。
- `StreamLinkTest.AnAnswerNobodyDeclaredIsNotKeptAtAll` —— 没声明的答案不进保留表(红法:全保留)。
- `RemoteClientControls.TheWindowRefusesToDeferOnALinkThatCannotRetainAnswers` —— 在不能保留的链路
(in-process/ShmLink)上,把旋钮开到 4 也必须每条 create 都走阻塞、`taken == 0`(红法:去掉能力位)。
- `ARefusedCreate...` 改成读这条臂上真正的修复链:拒绝 → 闩保持清零 → 下一次定义阻塞且再被拒 → 恢复消费者后闩回来;
并断言窗口的账本(`refusals`/`suspects`/`pending`)在这条臂上**全为空**。
**还没做的一件**(审计 E10(d),下一轮):窗口级门目前只有真机这一层,**没有跑在 stream 臂上的单元门**。
三轮「门全绿而功能在设备上是死的」都源于同一件事——门跑在 in-process/ShmLink 上。传输层的保留门已经补上,
窗口那一层建议建在 `StreamClientPublicationTest` 的真 stream 会话上(`AttachStreamLink` + 可控 peer)。
## 13. 复算
~~~sh ~~~sh
# 两臂的帧读数(handoff-2 §1 的读法) # 两臂的帧读数(handoff-2 §1 的读法)
@@ -126,6 +330,10 @@ grep -a "kind=frame-op frame=" mgl-device/logs/mcx-fix4.client | tail -1
grep -a "kind=frame-sent frame=" mgl-device/logs/mcx-fix4.client | tail -1 grep -a "kind=frame-sent frame=" mgl-device/logs/mcx-fix4.client | tail -1
# 一轮设备 run(自带 force-stop、就绪判据、负载帧检测、截屏、SIGTERM 收尾) # 一轮设备 run(自带 force-stop、就绪判据、负载帧检测、截屏、SIGTERM 收尾)
cd mgl-device && python3 run-once.py <tag> [MOBILEGL_IPC_CREATE_WINDOW=4] cd mgl-device && python3 run-once.py <tag> [MOBILEGL_IPC_CREATE_WINDOW=4]
# 窗口自己的读数(临时探针):taken / pushed / budget / readfail / posts
grep -a "P12win" mgl-device/logs/<tag>.client | tail -1
# 回包送达(服务端):posted / failed
grep -a "P12post" mgl-device/logs/<tag>.server | tail -1
# 门 # 门
build-split/MobileGL/MG_Test/Wire/RemoteClientTest --gtest_filter='*CreateWindow*:*RefusedCreate*' build-split/MobileGL/MG_Test/Wire/RemoteClientTest --gtest_filter='*CreateWindow*:*RefusedCreate*'
build-split/MobileGL/MG_Test/Wire/StreamLinkTest --gtest_filter='*OlderReply*' build-split/MobileGL/MG_Test/Wire/StreamLinkTest --gtest_filter='*OlderReply*'