[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

This commit is contained in:
2026-09-11 15:48:28 -04:00
parent 3a5e26215d
commit 950968044c
+9
View File
@@ -732,6 +732,15 @@ namespace MobileGL::MG_Pipe {
// store, or the pattern FillSubData expanded locally, and neither is this // store, or the pattern FillSubData expanded locally, and neither is this
// client's untransformed shadow of the level. // client's untransformed shadow of the level.
if (!MGPipeBuildSubDataRecord(handle, at, length, record, /*verbatimShadow=*/false)) return; 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. // The application's STAGING store, valid for the duration of the call only.
MGPipeApplyBufferSubDataResident(record, base + (at - offset)); MGPipeApplyBufferSubDataResident(record, base + (at - offset));
}); });