1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00

rsx: Separate guest flip timer from host timing operations

This commit is contained in:
kd-11 2022-04-13 22:29:26 +03:00 committed by kd-11
parent 89de1a8cf6
commit 57aee92bfe
4 changed files with 11 additions and 10 deletions

View File

@ -807,7 +807,7 @@ u64 cellGcmGetLastFlipTime()
{
cellGcmSys.trace("cellGcmGetLastFlipTime()");
return rsx::get_current_renderer()->last_flip_time;
return rsx::get_current_renderer()->last_guest_flip_timestamp;
}
error_code cellGcmGetLastFlipTime2()

View File

@ -326,13 +326,10 @@ namespace rsx
void overlay::refresh() const
{
if (auto rsxthr = rsx::get_current_renderer())
if (auto rsxthr = rsx::get_current_renderer(); rsxthr &&
(min_refresh_duration_us + rsxthr->last_host_flip_timestamp) < rsx::uclock())
{
const auto now = rsx::uclock() - 1000000;
if ((now - rsxthr->last_flip_time) > min_refresh_duration_us)
{
rsxthr->async_flip_requested |= rsx::thread::flip_request::native_ui;
}
rsxthr->async_flip_requested |= rsx::thread::flip_request::native_ui;
}
}
} // namespace overlays

View File

@ -640,7 +640,7 @@ namespace rsx
fifo_ctrl = std::make_unique<::rsx::FIFO::FIFO_control>(this);
last_flip_time = rsx::uclock() - 1000000;
last_guest_flip_timestamp = rsx::uclock() - 1000000;
vblank_count = 0;
@ -2487,6 +2487,8 @@ namespace rsx
{
performance_counters.sampled_frames++;
}
last_host_flip_timestamp = rsx::uclock();
}
void thread::check_zcull_status(bool framebuffer_swap)
@ -3162,7 +3164,7 @@ namespace rsx
flip(m_queued_flip);
last_flip_time = rsx::uclock() - 1000000;
last_guest_flip_timestamp = rsx::uclock() - 1000000;
flip_status = CELL_GCM_DISPLAY_FLIP_STATUS_DONE;
m_queued_flip.in_progress = false;

View File

@ -781,7 +781,9 @@ namespace rsx
public:
u64 target_rsx_flip_time = 0;
u64 int_flip_index = 0;
u64 last_flip_time = 0;
u64 last_guest_flip_timestamp = 0;
u64 last_host_flip_timestamp = 0;
vm::ptr<void(u32)> flip_handler = vm::null;
vm::ptr<void(u32)> user_handler = vm::null;
vm::ptr<void(u32)> vblank_handler = vm::null;