mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-15 22:21:25 +00:00
rsx: Improve MM synchronization
This commit is contained in:
parent
21eaee0e23
commit
30ca2370ab
@ -27,23 +27,24 @@ namespace rsx
|
||||
return;
|
||||
}
|
||||
|
||||
if constexpr (FlushDMA)
|
||||
{
|
||||
// If the backend handled the request, this call will basically be a NOP
|
||||
g_fxo->get<rsx::dma_manager>().sync();
|
||||
}
|
||||
|
||||
if constexpr (FlushPipe)
|
||||
{
|
||||
// Manually flush the pipeline.
|
||||
// It is possible to stream report writes using the host GPU, but that generates too much submit traffic.
|
||||
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();
|
||||
// Release op must be acoompanied by MM flush.
|
||||
// FlushPipe implicitly does a MM flush but FlushDMA does not. Trigger the flush here
|
||||
rsx::mm_flush();
|
||||
|
||||
if constexpr (FlushDMA)
|
||||
{
|
||||
// If the backend handled the request, this call will basically be a NOP
|
||||
g_fxo->get<rsx::dma_manager>().sync();
|
||||
}
|
||||
|
||||
if constexpr (FlushPipe)
|
||||
{
|
||||
// Manually flush the pipeline.
|
||||
// It is possible to stream report writes using the host GPU, but that generates too much submit traffic.
|
||||
RSX(ctx)->sync();
|
||||
}
|
||||
}
|
||||
|
||||
if (handled)
|
||||
|
@ -3182,6 +3182,8 @@ namespace rsx
|
||||
{
|
||||
m_eng_interrupt_mask.clear(rsx::pipe_flush_interrupt);
|
||||
|
||||
mm_flush();
|
||||
|
||||
if (zcull_ctrl->has_pending())
|
||||
{
|
||||
zcull_ctrl->sync(this);
|
||||
@ -3718,6 +3720,9 @@ namespace rsx
|
||||
{
|
||||
bool pause_emulator = false;
|
||||
|
||||
// MM sync. This is a pre-emptive operation, so we can use a deferred request.
|
||||
rsx::mm_flush_lazy();
|
||||
|
||||
// Marks the end of a frame scope GPU-side
|
||||
if (g_user_asked_for_frame_capture.exchange(false) && !capture_current_frame)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user