mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Fix] (MGPipe, MG_Remote): verify server pack state and reject records after guilty GPU resets
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user