mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 15:15:40 +00:00
GPU: Fix dump vram-to-cpu copies
This commit is contained in:
parent
da69085b3c
commit
bb4ef2103e
|
@ -377,6 +377,13 @@ bool GPU::HandleCopyRectangleVRAMToCPUCommand(const u32*& command_ptr, u32 comma
|
|||
// ensure VRAM shadow is up to date
|
||||
ReadVRAM(m_vram_transfer.x, m_vram_transfer.y, m_vram_transfer.width, m_vram_transfer.height);
|
||||
|
||||
if (m_system->GetSettings().debugging.dump_vram_to_cpu_copies)
|
||||
{
|
||||
DumpVRAMToFile(SmallString::FromFormat("vram_to_cpu_copy_%u.png", s_vram_to_cpu_dump_id++), m_vram_transfer.width,
|
||||
m_vram_transfer.height, sizeof(u16) * VRAM_WIDTH,
|
||||
&m_vram_ptr[m_vram_transfer.y * VRAM_WIDTH + m_vram_transfer.x], true);
|
||||
}
|
||||
|
||||
// switch to pixel-by-pixel read state
|
||||
m_stats.num_vram_reads++;
|
||||
m_state = State::ReadingVRAM;
|
||||
|
|
Loading…
Reference in a new issue