rsx: Improve performance even more when async MM is active

This commit is contained in:
kd-11 2024-11-26 01:45:43 +03:00 committed by kd-11
parent 4b30e82aee
commit cd7e1e1e2b
2 changed files with 12 additions and 2 deletions

View File

@ -98,6 +98,12 @@ namespace rsx
return;
}
std::lock_guard lock(g_mprotect_queue_lock);
if (g_deferred_mprotect_queue.empty())
{
return;
}
auto& rsxdma = g_fxo->get<rsx::dma_manager>();
rsxdma.backend_ctrl(mm_backend_ctrl::cmd_mm_flush, nullptr);
}

View File

@ -30,7 +30,6 @@ namespace rsx
if constexpr (FlushDMA)
{
// If the backend handled the request, this call will basically be a NOP
rsx::mm_flush_lazy();
g_fxo->get<rsx::dma_manager>().sync();
}
@ -38,10 +37,15 @@ namespace rsx
{
// Manually flush the pipeline.
// It is possible to stream report writes using the host GPU, but that generates too much submit traffic.
rsx::mm_flush();
RSX(ctx)->sync();
}
if constexpr (FlushDMA || FlushPipe)
{
// Kick MM flush without waiting. Technically we should do this before the sync in case of MTRSX, but doing it later improves CPU performance.
rsx::mm_flush_lazy();
}
if (handled)
{
// Backend will handle it, nothing to write.