mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-16 14:33:24 +09:00
[MG_Backend, MG_Pipe, MG_Impl, Docs] (Disaggregated): P5e ra2 ID-136 - retire the indirect-binding pull instead of escalating for it, and withdraw escalation (iii)
- TOUCHING mv's FILE UNDER ID-136, deliberately and by ruling: MG_Backend/DirectGLES/
MultiDraw.cpp is mv's per ID-113, and the integrator overrode that boundary for this one
change because the two halves must not exist apart on any head. The boundary has not drifted.
- BoundDrawIndirectBufferId (MultiDraw.cpp) gets the handle arm its neighbour
ResolveBoundIndexBuffer already had, in mv's own idiom rather than a second one beside it:
the arm is `MG_Config::Transport != Monolith`, STATED (ID-81) and never inferred from a null
handle (ID-110); a null handle is "this verb bound no indirect buffer", the same 0 the
monolith arm returns for an empty slot; a missing backend resource is the named refusal
Fatal{RoleViolation, "multidraw-indirect-buffer-arm"}, a sibling of mv's
RefuseMissingIndexBufferRecord, never a quiet fall-back to the frontend. The monolith body
below it is unchanged token for token. The function moved down beside BoundIndexBufferId,
which is the same question about the other target.
- WHY A HANDLE ARM AND NOT A MIGRATION: the tier never reads a byte of the client's indirect
buffer. It binds its OWN scratch command buffer and wants to put back the name that was
there - a save/restore. With a transport the only other writer of this process's
GL_DRAW_INDIRECT_BUFFER is DirectGLES.cpp's DrawSyncBit::IndirectBuffer arm, which binds from
MGPipeApplier().VerbIndirectBuffer and nothing else, so "what was bound" IS "what the verb's
record named".
- Escalation (iii) withdrawn in the same commit - MGPipeBarriered's clause, the client's
verb-keyed half in ClientVerbIsBarriered, and the contract row. It was never wrong, it was
the wrong instrument: there is one draw opcode and the tier is chosen server-side per batch,
so the narrowest key both roles could compute charged EVERY plain glMultiDraw* on the
auto -> ext default - a per-batch rendezvous on the arm the phone ships, added to make a lane
green. THE CHECK ON AN ESCALATION IS "WHICH ARM PAYS FOR IT", NOT "WHICH LANE GOES GREEN";
the rule is recorded in PipeApply.h beside the three that remain and in CONTRACT-P5E §2.1.
- Red-once D: `if (false && ...)` on the new arm and the entry dies 3/3, deterministically, on
`Fatal{UnmigratedPipeInput, "GetBufferBindingSlot@DrawArrays"} [BARRIER-PULLED, UNBARRIERED,
the client did not fill it, retires in P8 (indirect), P9 (readback), P13 (transfer)]`.
Its counterpart is this head itself: the escalation is GONE and the lane is green, so nothing
needed it - and the strict census's admitted set drops from nine rows back to ID-128's eight,
because the pull no longer happens at all rather than being legalised.
- Gate on the flipped head: unit 2256/2256, isplit 179/179, gens rc=0, lane counts unchanged
(179 / 1357 / 2 / 2).
This commit is contained in:
@@ -423,27 +423,15 @@ namespace MobileGL::MG_Pipe {
|
||||
static_assert(MGPipeVerbForWireOp(MGPWireOp::DrawVbo) == MGPipeVerb::DrawArrays,
|
||||
"the draw family's representative row moved; the fallback below names "
|
||||
"draw_vbo because that is the record every kDraw verb emits");
|
||||
// ---- P5e (ra2), ID-133: AND THE CLIENT'S HALF OF ESCALATION (iii) --------------
|
||||
//
|
||||
// The server escalates a PLAIN multi-draw record (`NumDraws > 1` and not indirect)
|
||||
// because Espryt's indirect tiers still pull the client's GL_DRAW_INDIRECT_BUFFER
|
||||
// binding at apply. The fill decision is asked HERE, before the record exists, so
|
||||
// it cannot read NumDraws - it asks the verb instead, and the three verbs below are
|
||||
// exactly the ones whose record can carry NumDraws > 1 without kDrawIsIndirect.
|
||||
//
|
||||
// THE DIRECTION OF THE INEQUALITY IS THE SAFETY ARGUMENT, and it is worth stating
|
||||
// because the two clauses are spelled differently. The client's set must CONTAIN
|
||||
// the server's: a record the server calls barriered whose fields the client did not
|
||||
// fill would be an ADMITTED pull of a stale value - legal-looking and wrong, which
|
||||
// is worse than the abort. It does contain it, because `NumDraws > 1` can only come
|
||||
// from a glMultiDraw* entry point, and the `MultiDraw*Indirect*` verbs set
|
||||
// kDrawIsIndirect and are therefore NOT escalated on either side. The reverse
|
||||
// inclusion is not needed: a verb the client fills for and the server then calls
|
||||
// unbarriered costs a fill nobody reads, never a wrong answer.
|
||||
const Bool plainMultiDraw = verb == MGPipeVerb::MultiDrawArrays ||
|
||||
verb == MGPipeVerb::MultiDrawElements ||
|
||||
verb == MGPipeVerb::MultiDrawElementsBaseVertex;
|
||||
if (plainMultiDraw) return true;
|
||||
// P5e (ra2): THE CLIENT'S HALF OF ESCALATION (iii) WAS HERE AND WENT WITH IT
|
||||
// (ID-133, withdrawn by ID-136). It named MultiDrawArrays / MultiDrawElements /
|
||||
// MultiDrawElementsBaseVertex so the client would FILL for the records the server
|
||||
// was escalating - a fill the server then read as a barriered pull. Retiring that
|
||||
// pull outright (MultiDraw.cpp's BoundDrawIndirectBufferId takes a handle arm) left
|
||||
// nothing for the fill to serve, so a plain multi-draw is an ordinary kDraw verb
|
||||
// again and takes the draw_vbo answer below. The pair is the phase's own lesson
|
||||
// written twice: a wait added to make a lane green is paid by an arm, and here the
|
||||
// arm was the default tier the phone ships.
|
||||
if (op == MGPWireOp::kOpCount &&
|
||||
kMGPipeVerbClass[static_cast<SizeT>(verb)] == MGPipeVerbClass::kDraw) {
|
||||
op = MGPWireOp::DrawVbo;
|
||||
|
||||
Reference in New Issue
Block a user