1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

rsx: Fixate time stamp of VBLANK

This commit is contained in:
Eladash 2021-10-29 22:23:29 +03:00 committed by Megamouse
parent 4369fb234e
commit b84e95d768
2 changed files with 9 additions and 2 deletions

View File

@ -732,13 +732,20 @@ error_code sys_rsx_context_attribute(u32 context_id, u32 package_id, u64 a3, u64
case 0xFED: // hack: vblank command
{
if (get_current_cpu_thread())
{
// VBLANK thread only
return CELL_EINVAL;
}
// NOTE: There currently seem to only be 2 active heads on PS3
ensure(a3 < 2);
// todo: this is wrong and should be 'second' vblank handler and freq, but since currently everything is reported as being 59.94, this should be fine
vm::_ref<u32>(render->device_addr + 0x30) = 1;
const u64 current_time = rsxTimeStamp();
// Time point is supplied in argument 4
const u64 current_time = a4;
driverInfo.head[a3].lastSecondVTime = current_time;

View File

@ -696,7 +696,7 @@ namespace rsx
}
else
{
sys_rsx_context_attribute(0x55555555, 0xFED, 1, 0, 0, 0);
sys_rsx_context_attribute(0x55555555, 0xFED, 1, post_event_time, 0, 0);
}
}
}