mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
#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() {}
|
|
|
|
void GPUCommonHW::PreExecuteOp(u32 op, u32 diff) {
|
|
CheckFlushOp(op >> 24, diff);
|
|
}
|
|
|
|
void GPUCommonHW::CopyDisplayToOutput(bool reallyDirty) {
|
|
// Flush anything left over.
|
|
drawEngineCommon_->DispatchFlush();
|
|
|
|
shaderManager_->DirtyLastShader();
|
|
|
|
framebufferManager_->CopyDisplayToOutput(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();
|
|
}
|
|
}
|