rsx: Add toggle for zcull sync behaviour - Adds a relaxed sync mode where ZCULL reports are lazily nudged into flushing and the main core does not actually wait for the event to finish before proceeding - Can drastically improve performance in cases where the game actually does not utilize the report data

This commit is contained in:
kd-11 2019-12-11 19:28:31 +03:00 committed by kd-11
parent 9f94a6dc11
commit fdb638436f
3 changed files with 18 additions and 10 deletions

View file

@ -2196,7 +2196,18 @@ namespace rsx
void thread::sync()
{
zcull_ctrl->sync(this);
if (zcull_ctrl->has_pending())
{
if (g_cfg.video.relaxed_zcull_sync)
{
// Emit zcull sync hint and update; guarantees results to be written shortly after this event
zcull_ctrl->update(this, 0, true);
}
else
{
zcull_ctrl->sync(this);
}
}
// Fragment constants may have been updated
m_graphics_state |= rsx::pipeline_state::fragment_constants_dirty;
@ -2433,16 +2444,12 @@ namespace rsx
Emu.Pause();
}
// Reset zcull ctrl
// Reset ZCULL ctrl
// NOTE: A semaphore release is part of RSX flip control and will handle ZCULL sync
// TODO: These routines belong in the state reset routines controlled by sys_rsx and cellGcmSetFlip
zcull_ctrl->set_active(this, false, true);
zcull_ctrl->clear(this);
if (zcull_ctrl->has_pending())
{
LOG_TRACE(RSX, "Dangling reports found, discarding...");
zcull_ctrl->sync(this);
}
// Save current state
m_queued_flip.stats = m_frame_stats;
m_queued_flip.push(buffer);