mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Make the DoState stuff less ugly
This commit is contained in:
parent
285ffbaa52
commit
9e8f1d3cb3
4 changed files with 24 additions and 17 deletions
|
@ -2867,17 +2867,6 @@ void GPUCommon::DoState(PointerWrap &p) {
|
|||
if (s >= 6) {
|
||||
Do(p, edramTranslation_);
|
||||
}
|
||||
|
||||
// TODO: Some of these things may not be necessary.
|
||||
// None of these are necessary when saving.
|
||||
// The textureCache_ check avoids this getting called in SoftGPU.
|
||||
if (p.mode == p.MODE_READ && !PSP_CoreParameter().frozen && textureCache_) {
|
||||
textureCache_->Clear(true);
|
||||
drawEngineCommon_->ClearTrackedVertexArrays();
|
||||
|
||||
gstate_c.Dirty(DIRTY_TEXTURE_IMAGE);
|
||||
framebufferManager_->DestroyAllFBOs();
|
||||
}
|
||||
}
|
||||
|
||||
void GPUCommon::InterruptStart(int listid) {
|
||||
|
|
|
@ -330,9 +330,10 @@ protected:
|
|||
|
||||
void UpdateMSAALevel(Draw::DrawContext *draw);
|
||||
|
||||
DrawEngineCommon *drawEngineCommon_ = nullptr;
|
||||
|
||||
FramebufferManagerCommon *framebufferManager_ = nullptr;
|
||||
TextureCacheCommon *textureCache_ = nullptr;
|
||||
DrawEngineCommon *drawEngineCommon_ = nullptr;
|
||||
ShaderManagerCommon *shaderManager_ = nullptr;
|
||||
bool flushOnParams_ = true;
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#include "Common/GPU/thin3d.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "GPU/GPUCommonHW.h"
|
||||
#include "GPU/Common/DrawEngineCommon.h"
|
||||
#include "GPU/Common/TextureCacheCommon.h"
|
||||
#include "GPU/Common/FramebufferManagerCommon.h"
|
||||
|
||||
|
||||
GPUCommonHW::GPUCommonHW(GraphicsContext *gfxCtx, Draw::DrawContext *draw) : GPUCommon(gfxCtx, draw) {
|
||||
|
||||
}
|
||||
|
||||
GPUCommonHW::GPUCommonHW(GraphicsContext *gfxCtx, Draw::DrawContext *draw) : GPUCommon(gfxCtx, draw) {}
|
||||
GPUCommonHW::~GPUCommonHW() {}
|
||||
|
||||
void GPUCommonHW::PreExecuteOp(u32 op, u32 diff) {
|
||||
|
@ -24,3 +25,17 @@ void GPUCommonHW::CopyDisplayToOutput(bool reallyDirty) {
|
|||
|
||||
gstate_c.Dirty(DIRTY_TEXTURE_IMAGE);
|
||||
}
|
||||
|
||||
void GPUCommonHW::DoState(PointerWrap &p) {
|
||||
GPUCommon::DoState(p);
|
||||
|
||||
// TODO: Some of these things may not be necessary.
|
||||
// None of these are necessary when saving.
|
||||
if (p.mode == p.MODE_READ && !PSP_CoreParameter().frozen) {
|
||||
textureCache_->Clear(true);
|
||||
drawEngineCommon_->ClearTrackedVertexArrays();
|
||||
|
||||
gstate_c.Dirty(DIRTY_TEXTURE_IMAGE);
|
||||
framebufferManager_->DestroyAllFBOs();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ public:
|
|||
~GPUCommonHW();
|
||||
|
||||
void CopyDisplayToOutput(bool reallyDirty) override;
|
||||
void DoState(PointerWrap &p) override;
|
||||
|
||||
protected:
|
||||
void PreExecuteOp(u32 op, u32 diff);
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue