video_core serialization

This commit is contained in:
Hamish Milne 2019-08-07 17:08:52 +01:00 committed by zhupengfei
parent ee2cae2093
commit 6f00976ab5
9 changed files with 142 additions and 21 deletions

View file

@ -397,22 +397,28 @@ void System::Reset() {
template<class Archive>
void System::serialize(Archive & ar, const unsigned int file_version)
{
ar & memory;
ar & GPU::g_regs;
ar & LCD::g_regs;
ar & dsp_core->GetDspMemory();
ar & memory;
}
void System::Save(std::ostream &stream) const
{
boost::archive::binary_oarchive oa{stream};
oa & *this;
{
oarchive oa{stream};
oa & *this;
}
VideoCore::Save(stream);
}
void System::Load(std::istream &stream)
{
boost::archive::binary_iarchive ia{stream};
ia & *this;
{
iarchive ia{stream};
ia & *this;
}
VideoCore::Load(stream);
}
} // namespace Core

View file

@ -472,14 +472,7 @@ inline void Write(u32 addr, const T data) {
if (config.trigger & 1) {
MICROPROFILE_SCOPE(GPU_CmdlistProcessing);
u32* buffer = (u32*)g_memory->GetPhysicalPointer(config.GetPhysicalAddress());
if (Pica::g_debug_context && Pica::g_debug_context->recorder) {
Pica::g_debug_context->recorder->MemoryAccessed((u8*)buffer, config.size,
config.GetPhysicalAddress());
}
Pica::CommandProcessor::ProcessCommandList(buffer, config.size);
Pica::CommandProcessor::ProcessCommandList(config.GetPhysicalAddress(), config.size);
g_regs.command_processor_config.trigger = 0;
}