From f4675d1ac05a7c9be5996051db92894c1386abf7 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Fri, 18 Sep 2026 08:06:59 -0400 Subject: [PATCH] [MG_Backend] (Disaggregated): P5e fb - SCAFFOLD, REVERTED BEFORE HEAD: tx2's two by-handle seams, so fb can measure its own lane - fb calls TextureImpl::SyncTextureToBackendByHandle and BackendTextureObject::SyncMipmapsToBackendByHandle from four places. tx2 owns those bodies and is being written in parallel, so with c0e's aborting stubs every integration-split entry that touches a texture dies on the seam and fb's own isplit and strict numbers cannot be read at all. - This commit bodies the two temporarily, in the one way that does not pre-empt tx2's design: the frontend texture is resolved from the record's own GL name through the BARRIER-PULLED sticky forward GetTextureObject, exactly as the copy-image sink resolves its endpoints, and the existing frontend overloads do the work. Correct under lockstep, and deliberately NOT the shape tx2 will write - tx2 drives the storage from the descriptor and holds no frontend object. - IT IS REVERTED BY THE NEXT-BUT-ONE COMMIT. It exists in history so the integrator can see exactly what fb assumed about the seam and what fb's measured numbers rest on. --- MobileGL/MG_Backend/DirectGLES/Managers.cpp | 41 +++++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/MobileGL/MG_Backend/DirectGLES/Managers.cpp b/MobileGL/MG_Backend/DirectGLES/Managers.cpp index 46cacf4e..cb29827d 100644 --- a/MobileGL/MG_Backend/DirectGLES/Managers.cpp +++ b/MobileGL/MG_Backend/DirectGLES/Managers.cpp @@ -14193,15 +14193,48 @@ namespace MobileGL::MG_Backend::DirectGLES { } // namespace namespace TextureImpl { + // ================================================================================ + // P5e SCAFFOLD (fb) - THIS COMMIT IS REVERTED BEFORE fb's HEAD. DO NOT LAND IT. + // ================================================================================ + // tx2 owns these two bodies and is being written in parallel. fb CALLS them from the + // attachment surface sync, the two attachment texture lists, the image sweep and the + // named blit, so with the c0e stubs in place every integration-split entry that touches + // a texture aborts on the seam rather than on anything fb wrote - which leaves fb's own + // isplit and strict numbers unmeasurable. + // + // So these two are bodied HERE, temporarily, in the ONLY way that does not pre-empt + // tx2's design: the frontend texture is resolved from the record's own GL name through + // the BARRIER-PULLED sticky forward GetTextureObject - exactly as the copy-image sink + // resolves its endpoints (PipeApplier.cpp) - and the existing frontend overloads then + // do the work. That is correct under lockstep (the client is parked, which is what + // makes a sticky forward legal) and it is deliberately NOT what tx2 will write: tx2 + // drives the storage from the descriptor and has no frontend object at all. + // + // What it costs, and what to read past when reading fb's numbers: each call adds a + // GetTextureObject pull, so the strict lane sees GetTextureObject@ markers that + // belong to this scaffold and not to fb. SharedPtr& SyncTextureToBackendByHandle(MG_Pipe::MGPipeHandle texture, Bool imageBindableStorageRequired) { - (void)imageBindableStorageRequired; - MGPipeP5eSeamNotLanded("TextureImpl::SyncTextureToBackendByHandle", "tx2", texture); + static SharedPtr s_scaffoldNone; + const auto* record = PipeTextureRecordForHandle(texture); + if (record == nullptr) { + s_scaffoldNone = nullptr; + return s_scaffoldNone; + } + const auto& stateObj = MGB_CTX->GetTextureObject(static_cast(record->Desc.GlNameForDiag)); + if (!stateObj) { + s_scaffoldNone = nullptr; + return s_scaffoldNone; + } + return SyncTextureObjectToBackend(stateObj, imageBindableStorageRequired); } void BackendTextureObject::SyncMipmapsToBackendByHandle(MG_Pipe::MGPipeHandle texture) { - MGPipeP5eSeamNotLanded("BackendTextureObject::SyncMipmapsToBackendByHandle", "tx2", - texture); + const auto* record = PipeTextureRecordForHandle(texture); + if (record == nullptr) return; + const auto& stateObj = MGB_CTX->GetTextureObject(static_cast(record->Desc.GlNameForDiag)); + if (!stateObj) return; + SyncMipmapsToBackend(stateObj); } } // namespace TextureImpl