Cleanup some state on reset in the GPU code.

This commit is contained in:
Unknown W. Brackets 2012-12-23 23:12:53 -08:00
parent 41db5c46a5
commit 2736012719
4 changed files with 12 additions and 1 deletions

View File

@ -191,6 +191,8 @@ GLES_GPU::~GLES_GPU()
delete (*iter);
}
vfbs_.clear();
delete flushBeforeCommand;
}
void GLES_GPU::InitClear()

View File

@ -56,6 +56,8 @@ void InitGfxState()
memcpy(gstate.boneMatrix + i * 12, identity4x3, 12 * sizeof(float));
}
gpuStats.reset();
switch (PSP_CoreParameter().gpuCore) {
case GPU_NULL:
gpu = new NullGPU();

View File

@ -46,6 +46,13 @@ static bool finished;
static int dlIdGenerator = 1;
NullGPU::NullGPU()
{
interruptsEnabled_ = true;
dlIdGenerator = 1;
dlQueue.clear();
}
bool NullGPU::ProcessDLQueue()
{
std::vector<DisplayList>::iterator iter = dlQueue.begin();

View File

@ -24,7 +24,7 @@ class ShaderManager;
class NullGPU : public GPUInterface
{
public:
NullGPU() : interruptsEnabled_(true) {}
NullGPU();
virtual void InitClear() {}
virtual u32 EnqueueList(u32 listpc, u32 stall);
virtual void UpdateStall(int listid, u32 newstall);