TMEM: Handle savestate and init

This commit is contained in:
Scott Mansell
2021-10-10 15:49:59 +13:00
parent 88bd10cd30
commit a33cf27885
5 changed files with 27 additions and 4 deletions

View File

@ -4,6 +4,8 @@
#include <array>
#include "Common/ChunkFile.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/TMEM.h"
@ -32,9 +34,9 @@ struct TextureUnitState
bool Overlaps(const BankConfig& other) const;
};
BankConfig even;
BankConfig odd;
State state;
BankConfig even = {};
BankConfig odd = {};
State state = State::INVALID;
bool Overlaps(const TextureUnitState& other) const;
};
@ -221,4 +223,14 @@ bool IsValid(u32 unit)
return s_unit[unit].state != TextureUnitState::State::INVALID;
}
void Init()
{
s_unit.fill({});
}
void DoState(PointerWrap& p)
{
p.DoArray(s_unit);
}
} // namespace TMEM