mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Fix] (Espryt, P9 W2): a texture re-mint never needs the client - read back only levels the driver holds, replay the staged level when the readback is refused, count trp on the server path, and retire the texture-remint-pull markers and OnTexturePullRequest (callbacks 9 -> 8)
This commit is contained in:
@@ -15,12 +15,20 @@
|
||||
// The backend -> frontend reverse channel, named (plan B section 7.1).
|
||||
//
|
||||
// Today this traffic is 95 call sites across 17 methods poked directly into frontend
|
||||
// objects. gallium has no vocabulary for shadow writeback, GPU-write notification, texture
|
||||
// re-send requests or default-framebuffer geometry, because in Mesa the state tracker and
|
||||
// the driver share an address space. Naming them as eight callbacks plus one forward
|
||||
// terminator (MGPipeContext::ResourceSubDataComplete) is the deliberate deviation (D8).
|
||||
// objects. gallium has no vocabulary for shadow writeback, GPU-write notification or
|
||||
// default-framebuffer geometry, because in Mesa the state tracker and the driver share an
|
||||
// address space. Naming them as callbacks is the deliberate deviation (D8).
|
||||
//
|
||||
// EIGHT, NOT THE TEN PLAN B WROTE. The tenth was OnXfbScatterReady, and it went with the
|
||||
// SEVEN, NOT THE TEN PLAN B WROTE. Three went, each because nothing produces it.
|
||||
//
|
||||
// OnTexturePullRequest, the server asking the client to re-send a texture's levels after
|
||||
// re-minting it (with op 50 ResourceSubDataComplete as the forward terminator). P9 W2 measured
|
||||
// that no re-mint needs the client: Espryt's server reads the GPU level back and replays its own
|
||||
// staged store, Magma copies GPU to GPU, on every arm (notes/p9/W2-REMINT.md). So the callback
|
||||
// went; op 50 stays in the opcode table as a retired row (opcodes only ever grow) and its decoder
|
||||
// still declines it.
|
||||
//
|
||||
// OnXfbScatterReady went with the
|
||||
// design it belonged to: plan B put the XFB scatter on the CLIENT (the server would hand
|
||||
// back the packed scratch and the client would run the patch loop over its own shadow), so
|
||||
// there had to be a callback that told the client the layout. P5c/P5f went the other way -
|
||||
@@ -31,8 +39,8 @@
|
||||
// reader of this file has to rule out by hand, and the size assertion below made it look
|
||||
// load-bearing.
|
||||
//
|
||||
// The ninth was OnLog, deleted in P9 W3 for the same reason: zero producers, zero consumers,
|
||||
// no EventKind. Plan B pictured the server's log lines as reverse-channel records; they never
|
||||
// And OnLog, deleted in P9 W3 for the same reason: zero producers, zero consumers, no
|
||||
// EventKind. Plan B pictured the server's log lines as reverse-channel records; they never
|
||||
// were. They travel the CONTROL plane as LogLine frames (protocol.fbs), written by the server's
|
||||
// logger through its log forward (MG_Remote/Transport/LogForward.h) - which is also where the
|
||||
// severity policy this entry's comment promised ("<= WARN lossy, >= ERROR lossless and rate
|
||||
@@ -50,11 +58,6 @@ namespace MobileGL::MG_Pipe {
|
||||
void (*OnGpuWritten)(MGPipeHandle res, Uint rangeCount, const MGPRange* ranges);
|
||||
void (*OnBufferWriteback)(MGPipeHandle res, Uint64 offset, MGPBlobRef bytes);
|
||||
void (*OnTextureWriteback)(MGPipeHandle res, const MGPBox* box, MGPBlobRef bytes);
|
||||
// The one new stall class in this design (D-B6): the server recast a texture and
|
||||
// needs its texels back. The client answers with zero or more ResourceSubData
|
||||
// records terminated by ResourceSubDataComplete carrying the same pullSerial.
|
||||
void (*OnTexturePullRequest)(MGPipeHandle res, Uint16 target, Uint16 firstLevel, Uint16 levelCount,
|
||||
Uint64 pullSerial);
|
||||
// SHAPE ONLY, never bytes: the client owns the CPU shadow and allocates the levels
|
||||
// itself.
|
||||
void (*OnMipLevelsGenerated)(MGPipeHandle res, Uint16 base, Uint16 count);
|
||||
@@ -64,9 +67,9 @@ namespace MobileGL::MG_Pipe {
|
||||
void (*OnCapsInvalidated)();
|
||||
};
|
||||
|
||||
// Eight, and the count is asserted so a ninth cannot be added without touching the
|
||||
// Seven, and the count is asserted so an eighth cannot be added without touching the
|
||||
// transport's reverse-channel record table.
|
||||
inline constexpr SizeT kMGPipeCallbackCount = 8;
|
||||
inline constexpr SizeT kMGPipeCallbackCount = 7;
|
||||
static_assert(sizeof(MGPipeCallbacks) == kMGPipeCallbackCount * sizeof(void (*)()),
|
||||
"MGPipeCallbacks gained or lost a callback");
|
||||
|
||||
|
||||
@@ -1217,8 +1217,8 @@ namespace MobileGL::MG_Pipe {
|
||||
// BindMask / ImageBindableHint bit reaches the applier only on a respecify, and an
|
||||
// IMMUTABLE texture has no further one - that is what immutable means - so the canonical
|
||||
// order (glTexStorage2D, then glBindImageTexture or an FBO attachment) would leave the
|
||||
// record's hint at 0 for ever, and the hint is the PREVENTION half of the texture-remint
|
||||
// stall class. So B re-emits the descriptor when the mask moves, and a record whose
|
||||
// record's hint at 0 for ever, and the hint is what PREVENTS the texture re-mint (a
|
||||
// server-side readback and re-upload, P9 W2). So B re-emits the descriptor when the mask moves, and a record whose
|
||||
// STORAGE-DEFINING fields all equal the stored descriptor's is applied as a metadata
|
||||
// update:
|
||||
//
|
||||
|
||||
@@ -430,15 +430,16 @@ namespace MobileGL::MG_Pipe {
|
||||
// all, glBindImageTexture's state setter (TextureState.h, MG_State), which may include no
|
||||
// emit header at all. So the note goes through this door, exactly as the birth hooks do.
|
||||
// Nothing produced either bit before the fix round: ImageBindableHint was always 0, the
|
||||
// metadata respecify (ID-18 M4) had no live trigger, and the remint pull the hint exists to
|
||||
// metadata respecify (ID-18 M4) had no live trigger, and the re-mint the hint exists to
|
||||
// prevent was neither prevented nor counted.
|
||||
//
|
||||
// UNCONDITIONAL IN A PUSH BUILD, like the mints: the mask is CLIENT state the framebuffer
|
||||
// emitter ORs into whether or not the texture family is on, and the emission a mask move
|
||||
// causes (the metadata respecify) is gated inside the emitter on the family's own pair.
|
||||
void MGPipeNoteTextureBoundAs(MGPipeHandle texture, Uint32 bindBit);
|
||||
// glBindImageTexture. The hint is the PREVENTION half of the texture-remint stall class -
|
||||
// a texture the server knows may be image-bound is allocated image-bindable up front - so it
|
||||
// glBindImageTexture. The hint PREVENTS the texture re-mint (a server-side readback and
|
||||
// re-upload of every defined level, P9 W2) - a texture the server knows may be image-bound is
|
||||
// allocated image-bindable up front - so it
|
||||
// has to reach the applier before the texture's first sync, i.e. at the bind itself, not at
|
||||
// the validate point's image walk (which notes it as well, D-A4's letter).
|
||||
void MGPipeNoteTextureImageBound(MG_State::GLState::ITextureObject& texture);
|
||||
|
||||
Reference in New Issue
Block a user