From 5445cb516aaf188b9f8b7d7fe703d8d7c8f2935c Mon Sep 17 00:00:00 2001 From: TJnotJT Date: Sun, 19 Oct 2025 09:06:32 -0400 Subject: [PATCH] GS: Handle zero clears separately in transfer dump. --- pcsx2/GS/GSState.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 9f087048e6..83fd27aa38 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -802,13 +802,15 @@ void GSState::DumpTransferList(const std::string& filename) if (n_dumped > 0) (*file) << std::endl; - // EE->GS or GS->GS - (*file) << LIST_ITEM << "type: " << (transfer.ee_to_gs ? "EE_to_GS" : "GS_to_GS") << std::endl; + // clear, EE->GS, or GS->GS + (*file) << LIST_ITEM << "type: " << (transfer.zero_clear ? "clear" : (transfer.ee_to_gs ? "EE_to_GS" : "GS_to_GS")) << std::endl; // Dump BITBLTBUF (*file) << INDENT << "BITBLTBUF: " << OPEN_MAP; - if (!transfer.ee_to_gs) + const bool gs_to_gs = !transfer.ee_to_gs && !transfer.zero_clear; + + if (gs_to_gs) { // Transferring GS->GS so the source info is relevant (*file) << "SBP: " << std::hex << std::showbase << transfer.blit.SBP << DEL << @@ -822,7 +824,7 @@ void GSState::DumpTransferList(const std::string& filename) (*file) << COMMENT; // Write the human-readable PSM in comments - if (!transfer.ee_to_gs) + if (gs_to_gs) { // Transferring GS->GS so the source info is relevant (*file) << GSUtil::GetPSMName(transfer.blit.SPSM) << " -> "; @@ -834,9 +836,6 @@ void GSState::DumpTransferList(const std::string& filename) (*file) << INDENT << "rect: [" << std::dec << transfer.rect.x << DEL << transfer.rect.y << DEL << transfer.rect.z << DEL << transfer.rect.w << "]" << std::endl; - // Dump zero_clear - (*file) << INDENT << "zero_clear: " << (transfer.zero_clear ? "true" : "false") << std::endl; - n_dumped++; } } @@ -855,17 +854,17 @@ void GSState::DumpTransferImages() const GSUploadQueue& transfer = m_draw_transfers[i]; std::string filename; - if (transfer.ee_to_gs) + if (transfer.ee_to_gs || transfer.zero_clear) { - // Transferring EE->GS then only the destination info is relevant. - filename = GetDrawDumpPath("%05d_transfer%02d_EE_to_GS_%03x_%d_%s_%d_%d_%d_%d.png", - s_n, transfer_n++, transfer.blit.DBP, transfer.blit.DBW, GSUtil::GetPSMName(transfer.blit.DPSM), - transfer.rect.x, transfer.rect.y, transfer.rect.z, transfer.rect.w); + // clear or EE->GS: only the destination info is relevant. + filename = GetDrawDumpPath("%05d_transfer%02d_%s_%04x_%d_%s_%d_%d_%d_%d.png", + s_n, transfer_n++, (transfer.zero_clear ? "clear" : "EE_to_GS"), transfer.blit.DBP, transfer.blit.DBW, + GSUtil::GetPSMName(transfer.blit.DPSM), transfer.rect.x, transfer.rect.y, transfer.rect.z, transfer.rect.w); } else { - // Transferring GS->GS then the source info is relevant. - filename = GetDrawDumpPath("%05d_transfer%02d_GS_to_GS_%03x_%d_%s_%03x_%d_%s_%d_%d_%d_%d.bmp", + // GS->GS: the source and destination info are both relevant. + filename = GetDrawDumpPath("%05d_transfer%02d_GS_to_GS_%04x_%d_%s_%04x_%d_%s_%d_%d_%d_%d.bmp", s_n, transfer_n++, transfer.blit.SBP, transfer.blit.SBW, GSUtil::GetPSMName(transfer.blit.SPSM), transfer.blit.DBP, transfer.blit.DBW, GSUtil::GetPSMName(transfer.blit.DPSM), transfer.rect.x, transfer.rect.y, transfer.rect.z, transfer.rect.w);