Minor GPU interface change needed for a WIP backend

This commit is contained in:
Henrik Rydgard 2016-01-06 23:53:21 +01:00
parent e11d0a7e1c
commit 94c91e199a
4 changed files with 22 additions and 1 deletions

View file

@ -486,10 +486,15 @@ void PSP_Shutdown() {
void PSP_BeginHostFrame() {
// Reapply the graphics state of the PSP
gpu->ReapplyGfxState();
if (gpu) {
gpu->BeginHostFrame();
}
}
void PSP_EndHostFrame() {
if (gpu) {
gpu->EndHostFrame();
}
}
void PSP_RunLoopUntil(u64 globalticks) {

View file

@ -40,6 +40,14 @@ GPUCommon::GPUCommon() :
GPUCommon::~GPUCommon() {
}
void GPUCommon::BeginHostFrame() {
ReapplyGfxState();
}
void GPUCommon::EndHostFrame() {
}
void GPUCommon::Reinitialize() {
easy_guard guard(listLock);
memset(dls, 0, sizeof(dls));

View file

@ -21,6 +21,9 @@ public:
void Reinitialize() override;
void BeginHostFrame() override;
void EndHostFrame() override;
void InterruptStart(int listid) override;
void InterruptEnd(int listid) override;
void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads) override;

View file

@ -214,6 +214,11 @@ public:
virtual void InitClear() = 0;
virtual void Reinitialize() = 0;
// Frame managment
virtual void BeginHostFrame() = 0;
virtual void EndHostFrame() = 0;
// Events
virtual void RunEventsUntil(u64 globalticks) = 0;
virtual void FinishEventLoop() = 0;