mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-13 07:14:49 +00:00
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:
parent
9f94a6dc11
commit
fdb638436f
@ -2196,7 +2196,18 @@ namespace rsx
|
|||||||
|
|
||||||
void thread::sync()
|
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
|
// Fragment constants may have been updated
|
||||||
m_graphics_state |= rsx::pipeline_state::fragment_constants_dirty;
|
m_graphics_state |= rsx::pipeline_state::fragment_constants_dirty;
|
||||||
@ -2433,16 +2444,12 @@ namespace rsx
|
|||||||
Emu.Pause();
|
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->set_active(this, false, true);
|
||||||
zcull_ctrl->clear(this);
|
zcull_ctrl->clear(this);
|
||||||
|
|
||||||
if (zcull_ctrl->has_pending())
|
|
||||||
{
|
|
||||||
LOG_TRACE(RSX, "Dangling reports found, discarding...");
|
|
||||||
zcull_ctrl->sync(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save current state
|
// Save current state
|
||||||
m_queued_flip.stats = m_frame_stats;
|
m_queued_flip.stats = m_frame_stats;
|
||||||
m_queued_flip.push(buffer);
|
m_queued_flip.push(buffer);
|
||||||
|
@ -560,8 +560,8 @@ VKGSRender::VKGSRender() : GSRender()
|
|||||||
// Confirmed in BLES01916 (The Evil Within) which uses RGB565 for some virtual texturing data.
|
// Confirmed in BLES01916 (The Evil Within) which uses RGB565 for some virtual texturing data.
|
||||||
backend_config.supports_hw_renormalization = (vk::get_driver_vendor() == vk::driver_vendor::NVIDIA);
|
backend_config.supports_hw_renormalization = (vk::get_driver_vendor() == vk::driver_vendor::NVIDIA);
|
||||||
|
|
||||||
// Stub
|
// Relaxed query synchronization
|
||||||
backend_config.supports_hw_conditional_render = true;
|
backend_config.supports_hw_conditional_render = !!g_cfg.video.relaxed_zcull_sync;
|
||||||
}
|
}
|
||||||
|
|
||||||
VKGSRender::~VKGSRender()
|
VKGSRender::~VKGSRender()
|
||||||
|
@ -497,6 +497,7 @@ struct cfg_root : cfg::node
|
|||||||
cfg::_bool strict_texture_flushing{this, "Strict Texture Flushing", false};
|
cfg::_bool strict_texture_flushing{this, "Strict Texture Flushing", false};
|
||||||
cfg::_bool disable_native_float16{this, "Disable native float16 support", false};
|
cfg::_bool disable_native_float16{this, "Disable native float16 support", false};
|
||||||
cfg::_bool multithreaded_rsx{this, "Multithreaded RSX", false};
|
cfg::_bool multithreaded_rsx{this, "Multithreaded RSX", false};
|
||||||
|
cfg::_bool relaxed_zcull_sync{this, "Relaxed ZCULL Sync", false};
|
||||||
cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames To Draw", 1};
|
cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames To Draw", 1};
|
||||||
cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames To Skip", 1};
|
cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames To Skip", 1};
|
||||||
cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100};
|
cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user