mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
rsx: Improve MM synchronization
This commit is contained in:
parent
21eaee0e23
commit
30ca2370ab
2 changed files with 21 additions and 15 deletions
|
@ -27,6 +27,12 @@ namespace rsx
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if constexpr (FlushDMA || FlushPipe)
|
||||||
|
{
|
||||||
|
// 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 constexpr (FlushDMA)
|
||||||
{
|
{
|
||||||
// If the backend handled the request, this call will basically be a NOP
|
// If the backend handled the request, this call will basically be a NOP
|
||||||
|
@ -39,11 +45,6 @@ namespace rsx
|
||||||
// It is possible to stream report writes using the host GPU, but that generates too much submit traffic.
|
// It is possible to stream report writes using the host GPU, but that generates too much submit traffic.
|
||||||
RSX(ctx)->sync();
|
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)
|
if (handled)
|
||||||
|
|
|
@ -3182,6 +3182,8 @@ namespace rsx
|
||||||
{
|
{
|
||||||
m_eng_interrupt_mask.clear(rsx::pipe_flush_interrupt);
|
m_eng_interrupt_mask.clear(rsx::pipe_flush_interrupt);
|
||||||
|
|
||||||
|
mm_flush();
|
||||||
|
|
||||||
if (zcull_ctrl->has_pending())
|
if (zcull_ctrl->has_pending())
|
||||||
{
|
{
|
||||||
zcull_ctrl->sync(this);
|
zcull_ctrl->sync(this);
|
||||||
|
@ -3718,6 +3720,9 @@ namespace rsx
|
||||||
{
|
{
|
||||||
bool pause_emulator = false;
|
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
|
// Marks the end of a frame scope GPU-side
|
||||||
if (g_user_asked_for_frame_capture.exchange(false) && !capture_current_frame)
|
if (g_user_asked_for_frame_capture.exchange(false) && !capture_current_frame)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue