[Fix] (MGPipe, MG_Remote): verify server pack state and reject records after guilty GPU resets

This commit is contained in:
2026-10-05 02:51:19 -04:00
parent c5d25868cf
commit f5b8fe48aa
6 changed files with 65 additions and 108 deletions
+3
View File
@@ -2097,6 +2097,9 @@ namespace MobileGL::MG_Pipe {
}
void MGPipeApplySetPixelPackState(const MGPPixelPackState& pack) {
#if MOBILEGL_PIPE_VERIFY
MGPipeApplier().VerifyPixelPack = pack.Pack;
#endif
MGPipeApplyAccess::PackState(gPipeInputs) = pack.Pack;
}
+5
View File
@@ -602,6 +602,11 @@ namespace MobileGL::MG_Pipe {
// The per-context half. Everything here is cleared by MGPipeApplierReset, EXCEPT the serials,
// which only ever advance (see there).
struct MGPipeWorkingState {
#if MOBILEGL_PIPE_VERIFY
// Reference from the pack-state payload, separate from the backend-visible storage.
// The server has no frontend GLContext to use as a read-time oracle.
PixelStoreParameters VerifyPixelPack{};
#endif
// Indexed by slot; slot 0 is the reserved null handle and is never live
// (MGPipeHandles.h kMGPipeFirstAllocatableSlot).
Vector<MGPipeRenderStateCsoRecord> RenderStateCsos;