mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
FifoPlayer: Save/restore texture memory state for fifo logs
This commit is contained in:
@ -25,6 +25,10 @@
|
||||
#include "VideoCommon/BPMemory.h"
|
||||
#include "VideoCommon/CommandProcessor.h"
|
||||
|
||||
// We need to include TextureDecoder.h for the texMem array.
|
||||
// TODO: Move texMem somewhere else so this isn't an issue.
|
||||
#include "VideoCommon/TextureDecoder.h"
|
||||
|
||||
bool IsPlayingBackFifologWithBrokenEFBCopies = false;
|
||||
|
||||
FifoPlayer::~FifoPlayer()
|
||||
@ -127,6 +131,7 @@ int FifoPlayer::AdvanceFrame()
|
||||
// GPU is the same for each playback loop.
|
||||
m_CurrentFrame = m_FrameRangeStart;
|
||||
LoadRegisters();
|
||||
LoadTextureMemory();
|
||||
FlushWGP();
|
||||
}
|
||||
|
||||
@ -420,6 +425,7 @@ void FifoPlayer::LoadMemory()
|
||||
|
||||
SetupFifo();
|
||||
LoadRegisters();
|
||||
LoadTextureMemory();
|
||||
FlushWGP();
|
||||
}
|
||||
|
||||
@ -460,6 +466,13 @@ void FifoPlayer::LoadRegisters()
|
||||
LoadXFReg(i, regs[i]);
|
||||
}
|
||||
|
||||
void FifoPlayer::LoadTextureMemory()
|
||||
{
|
||||
static_assert(static_cast<size_t>(TMEM_SIZE) == static_cast<size_t>(FifoDataFile::TEX_MEM_SIZE),
|
||||
"TMEM_SIZE matches the size of texture memory in FifoDataFile");
|
||||
std::memcpy(texMem, m_File->GetTexMem(), FifoDataFile::TEX_MEM_SIZE);
|
||||
}
|
||||
|
||||
void FifoPlayer::WriteCP(u32 address, u16 value)
|
||||
{
|
||||
PowerPC::Write_U16(value, 0xCC000000 | address);
|
||||
|
Reference in New Issue
Block a user