MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / Sync

Method Sync

pcsx2/GS/Renderers/SW/GSRendererSW.cpp:694–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694void GSRendererSW::Sync(int reason)
695{
696 //printf("sync %d\n", reason);
697
698 u64 t = LOG ? GetCPUTicks() : 0;
699
700 m_rl->Sync();
701
702 if constexpr (LOG && false)
703 {
704 std::string s;
705
706 if (GSConfig.SaveRT)
707 {
708 s = GetDrawDumpPath("%05lld_f%05lld_rt1_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), m_context->FRAME.Block(), GSUtil::GetPSMName(m_context->FRAME.PSM));
709
710 m_mem.SaveBMP(s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, PCRTCDisplays.GetFramebufferRect(-1).width(), 512);
711 }
712
713 if (GSConfig.SaveDepth)
714 {
715 s = GetDrawDumpPath("%05lld_f%05lld_zb1_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), m_context->ZBUF.Block(), GSUtil::GetPSMName(m_context->ZBUF.PSM));
716
717 m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, PCRTCDisplays.GetFramebufferRect(-1).width(), 512);
718 }
719 }
720
721 t = LOG ? (GetCPUTicks() - t) : 0;
722
723 int pixels = m_rl->GetPixels();
724
725 if constexpr (LOG)
726 {
727 fprintf(s_fp, "sync n=%lld r=%d t=%" PRIu64 " p=%d %c\n", s_n, reason, t, pixels, t > 10000000 ? '*' : ' ');
728 fflush(s_fp);
729 }
730
731 g_perfmon.Put(GSPerfMon::Fillrate, pixels);
732}
733
734void GSRendererSW::InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r)
735{

Callers

nothing calls this directly

Calls 8

fprintfFunction · 0.85
GetFrameMethod · 0.80
SaveBMPMethod · 0.80
GetFramebufferRectMethod · 0.80
GetCPUTicksFunction · 0.50
BlockMethod · 0.45
GetPixelsMethod · 0.45
PutMethod · 0.45

Tested by

no test coverage detected