[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:
swung0x48 committed 2026-10-06 11:56:18 -04:00
1 parent c879776a26
commit 1956d6cd6f
7 files changed
+14 -5

No files matched your search

@@ -962,7 +962,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
} }
Bool BackendObject_DirectGLES::LatchIfGpuFaulted() { Bool BackendObject_DirectGLES::LatchIfGpuFaulted() {
#if MOBILEGL_BUILD_RECORD_ARM #if MOBILEGL_BUILD_DISAGGREGATED
return LatchIfGuiltyBeforeApply(); return LatchIfGuiltyBeforeApply();
#else #else
return false; return false;
@@ -1687,7 +1687,7 @@ void main() {
return true; return true;
} }
#if MOBILEGL_BUILD_DISAGGREGATED #if MOBILEGL_BUILD_RECORD_ARM
// P5c (T5 / tx): the split arm of EnsureGenerateMipmapStorageAllocated. Under an active // P5c (T5 / tx): the split arm of EnsureGenerateMipmapStorageAllocated. Under an active
// transport the apply thread may not WRITE the client's level storage - AllocateStorage // transport the apply thread may not WRITE the client's level storage - AllocateStorage
// and MarkStorageDirty on a frontend TextureObjectMipmap are §6 layer-1 surfaces // 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 // inline that no caller in such a build ever has a reason to call twice - the disaggregated
// arm above is the real one. // arm above is the real one.
inline PipeInputs& MGPipeClientInputs() { return gPipeInputs; } inline PipeInputs& MGPipeClientInputs() { return gPipeInputs; }
// P13 W5: one block, no client-role stamp to withdraw.
inline void MGPipeClientClearVerbBoundary() {}
#endif #endif
// Every field has storage or is forwarded, and nothing else. // Every field has storage or is forwarded, and nothing else.
+5 -1
View File
@@ -352,6 +352,10 @@ namespace MobileGL::MG_Pipe {
namespace { namespace {
GLContext* LiveContext() { return MG_State::pGLContext.get(); } 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 #if MOBILEGL_BUILD_DISAGGREGATED
// ---- P5e (ra): the fill decision (CONTRACT-P5E §3.1) ----------------------------- // ---- P5e (ra): the fill decision (CONTRACT-P5E §3.1) -----------------------------
// //
@@ -3618,7 +3622,7 @@ namespace MobileGL::MG_Pipe {
} }
#endif #endif
MGPipeCsoCacheInstance().Reset(); MGPipeCsoCacheInstance().Reset();
#if MOBILEGL_BUILD_RECORD_ARM #if MOBILEGL_BUILD_DISAGGREGATED
if (!resetCrossed) if (!resetCrossed)
#endif #endif
MGPipeApplierReset(); 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 // 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. // usable as an identity; 0 is "no EGL context", the server's "no context" applier.
inline Uint64 MGPipeCurrentShareGroupToken() { inline Uint64 MGPipeCurrentShareGroupToken() {
#if MOBILEGL_BUILD_RECORD_ARM #if MOBILEGL_BUILD_DISAGGREGATED
Uint64 bound = 0; Uint64 bound = 0;
if (MG_Impl::EGLImpl::StreamBoundShareGroupToken(&bound)) return bound; if (MG_Impl::EGLImpl::StreamBoundShareGroupToken(&bound)) return bound;
#endif #endif
+1 -1
View File
@@ -1495,7 +1495,7 @@ namespace MobileGL::MG_Pipe {
return true; return true;
} }
#if MOBILEGL_BUILD_DISAGGREGATED #if MOBILEGL_BUILD_RECORD_ARM
// Texture records can have a server consumer without the buffer ops table (Magma). // 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 // 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. // 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 / // presents, included. Asked only for a session with a context bound; asks the environment /
// property at most every 100 ms per thread. // property at most every 100 ms per thread.
bool MGPipeDebugSessionLossDue(unsigned clientPid); 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 #endif
} // namespace MobileGL::MG_Pipe } // namespace MobileGL::MG_Pipe