diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index 7331d99d35..b12b695c62 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -33,9 +33,11 @@ void __GeDoState(PointerWrap &p) { p.Do(gstate); p.Do(gstate_c); + p.Do(gpuStats); ReapplyGfxState(); gpu->InvalidateCache(0, -1); + gpu->DoState(p); p.DoMarker("sceGe"); } diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index 1ca7c42e4d..bc02147ca4 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -1057,7 +1057,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { break; default: - DEBUG_LOG(G3D,"DL Unknown: %08x @ %08x", op, currentList->pc); + DEBUG_LOG(G3D,"DL Unknown: %08x @ %08x", op, currentList == NULL ? 0 : currentList->pc); break; } } diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 32ebb12465..725f5295a5 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -117,4 +117,10 @@ bool GPUCommon::ProcessDLQueue() void GPUCommon::PreExecuteOp(u32 op, u32 diff) { // Nothing to do -} \ No newline at end of file +} + +void GPUCommon::DoState(PointerWrap &p) { + p.Do(dlIdGenerator); + p.Do(dlQueue); + p.DoMarker("GPUCommon"); +} diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 03a31b1344..3bed056585 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -19,6 +19,7 @@ public: virtual void UpdateStall(int listid, u32 newstall); virtual u32 EnqueueList(u32 listpc, u32 stall, bool head); virtual int listStatus(int listid); + virtual void DoState(PointerWrap &p); protected: typedef std::deque DisplayListQueue; diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index ac45316451..19c2212d77 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -18,6 +18,7 @@ #pragma once #include "../Globals.h" +#include "../Common/ChunkFile.h" #include enum DisplayListStatus @@ -75,6 +76,7 @@ public: virtual void DeviceLost() = 0; virtual void Flush() = 0; + virtual void DoState(PointerWrap &p) = 0; // Debugging virtual void DumpNextFrame() = 0;