[Refactor] (P13 W5 S3): transport-only hooks get no-op twins where the record arm calls them, and their guards return to the transport.

This commit is contained in:
2026-10-06 11:56:18 -04:00
parent c879776a26
commit 1956d6cd6f
7 changed files with 14 additions and 5 deletions
@@ -962,7 +962,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
}
Bool BackendObject_DirectGLES::LatchIfGpuFaulted() {
#if MOBILEGL_BUILD_RECORD_ARM
#if MOBILEGL_BUILD_DISAGGREGATED
return LatchIfGuiltyBeforeApply();
#else
return false;
@@ -1687,7 +1687,7 @@ void main() {
return true;
}
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
// P5c (T5 / tx): the split arm of EnsureGenerateMipmapStorageAllocated. Under an active
// transport the apply thread may not WRITE the client's level storage - AllocateStorage
// and MarkStorageDirty on a frontend TextureObjectMipmap are §6 layer-1 surfaces
+2
View File
@@ -1006,6 +1006,8 @@ namespace MobileGL::MG_Pipe {
// inline that no caller in such a build ever has a reason to call twice - the disaggregated
// arm above is the real one.
inline PipeInputs& MGPipeClientInputs() { return gPipeInputs; }
// P13 W5: one block, no client-role stamp to withdraw.
inline void MGPipeClientClearVerbBoundary() {}
#endif
// Every field has storage or is forwarded, and nothing else.
+5 -1
View File
@@ -352,6 +352,10 @@ namespace MobileGL::MG_Pipe {
namespace {
GLContext* LiveContext() { return MG_State::pGLContext.get(); }
#if !MOBILEGL_BUILD_DISAGGREGATED
// P13 W5: no transport, no run-ahead client.
Bool ClientRunsAhead() { return false; }
#endif
#if MOBILEGL_BUILD_DISAGGREGATED
// ---- P5e (ra): the fill decision (CONTRACT-P5E §3.1) -----------------------------
//
@@ -3618,7 +3622,7 @@ namespace MobileGL::MG_Pipe {
}
#endif
MGPipeCsoCacheInstance().Reset();
#if MOBILEGL_BUILD_RECORD_ARM
#if MOBILEGL_BUILD_DISAGGREGATED
if (!resetCrossed)
#endif
MGPipeApplierReset();
+1 -1
View File
@@ -220,7 +220,7 @@ namespace MobileGL::MG_Pipe {
// tokens are minted once and never reused (EGLState::CreateContext), which is what makes them
// usable as an identity; 0 is "no EGL context", the server's "no context" applier.
inline Uint64 MGPipeCurrentShareGroupToken() {
#if MOBILEGL_BUILD_RECORD_ARM
#if MOBILEGL_BUILD_DISAGGREGATED
Uint64 bound = 0;
if (MG_Impl::EGLImpl::StreamBoundShareGroupToken(&bound)) return bound;
#endif
+1 -1
View File
@@ -1495,7 +1495,7 @@ namespace MobileGL::MG_Pipe {
return true;
}
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
// Texture records can have a server consumer without the buffer ops table (Magma).
// Their staged bytes still belong to the server before SEG_STAGE retires. Keep the
// existing backend hooks authoritative when present, and use this fallback otherwise.
+3
View File
@@ -173,6 +173,9 @@ namespace MobileGL::MG_Pipe {
// presents, included. Asked only for a session with a context bound; asks the environment /
// property at most every 100 ms per thread.
bool MGPipeDebugSessionLossDue(unsigned clientPid);
#else
// P13 W5: the device-loss knobs end a SESSION; a library without a transport has none to end.
inline bool MGPipeDebugDeviceLossDue() { return false; }
#endif
} // namespace MobileGL::MG_Pipe