From 950968044c788757a2cb2d928678e338e98aa1a1 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Fri, 11 Sep 2026 15:48:28 -0400 Subject: [PATCH] [Fix] (MG_Impl, PipeFill): make buffer_subdata_resident declare the live-host-writes bit - ApplyBufferWrite assigns it, so a silent content record writes false over a live write map --- MobileGL/MG_Impl/Pipe/PipeFill.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MobileGL/MG_Impl/Pipe/PipeFill.cpp b/MobileGL/MG_Impl/Pipe/PipeFill.cpp index 3e08c604..2d7198ef 100644 --- a/MobileGL/MG_Impl/Pipe/PipeFill.cpp +++ b/MobileGL/MG_Impl/Pipe/PipeFill.cpp @@ -732,6 +732,15 @@ namespace MobileGL::MG_Pipe { // store, or the pattern FillSubData expanded locally, and neither is this // client's untransformed shadow of the level. if (!MGPipeBuildSubDataRecord(handle, at, length, record, /*verbatimShadow=*/false)) return; +#if MOBILEGL_BUILD_DISAGGREGATED + // P5 (b1): THE SECOND CONTENT EMITTER, and it has to speak for the same reason + // the first does. ApplyBufferWrite ASSIGNS the bit - a content record emitted + // while nothing maps the buffer is how the state goes back to false - so a + // resident sub-data that stayed silent would write false over a live write + // map. `glBufferSubData` against a persistently mapped arena is legal and is + // the ordinary Flywheel/Create shape, so that is not a corner. + record.HasLiveHostWrites = buffer.HasLiveHostWritesForWire() ? 1 : 0; +#endif // The application's STAGING store, valid for the duration of the call only. MGPipeApplyBufferSubDataResident(record, base + (at - offset)); });