| 692 | } |
| 693 | |
| 694 | void 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 | |
| 734 | void GSRendererSW::InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r) |
| 735 | { |
nothing calls this directly
no test coverage detected