1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

sys_rsx: Implement LLE cellGcmSysGetLastVBlankTime

This commit is contained in:
Eladash 2020-04-10 22:14:33 +03:00 committed by kd-11
parent 93b8f3b5db
commit 5ba26e247b
2 changed files with 12 additions and 4 deletions

View File

@ -625,8 +625,16 @@ error_code sys_rsx_context_attribute(u32 context_id, u32 package_id, u64 a3, u64
// 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 // 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; vm::_ref<u32>(render->device_addr + 0x30) = 1;
const u64 current_time = rsxTimeStamp();
driverInfo.head[a3].lastSecondVTime = current_time;
// Note: not atomic
driverInfo.head[a3].lastVTimeLow = static_cast<u32>(current_time);
driverInfo.head[a3].lastVTimeHigh = static_cast<u32>(current_time >> 32);
driverInfo.head[a3].vBlankCount++; driverInfo.head[a3].vBlankCount++;
driverInfo.head[a3].lastSecondVTime = rsxTimeStamp();
u64 event_flags = SYS_RSX_EVENT_VBLANK; u64 event_flags = SYS_RSX_EVENT_VBLANK;

View File

@ -27,12 +27,12 @@ struct RsxDriverInfo
be_t<u32> flipBufferId; // 0x10 be_t<u32> flipBufferId; // 0x10
be_t<u32> lastQueuedBufferId; // 0x14 todo: this is definately not this variable but its 'unused' so im using it for queueId to pass to flip handler be_t<u32> lastQueuedBufferId; // 0x14 todo: this is definately not this variable but its 'unused' so im using it for queueId to pass to flip handler
be_t<u32> unk3; // 0x18 be_t<u32> unk3; // 0x18
be_t<u32> unk6; // 0x18 possible low bits of time stamp? used in getlastVBlankTime be_t<u32> lastVTimeLow; // 0x1C last time for first vhandler freq (low 32-bits)
be_t<u64> lastSecondVTime; // 0x20 last time for second vhandler freq be_t<u64> lastSecondVTime; // 0x20 last time for second vhandler freq
be_t<u64> unk4; // 0x28 be_t<u64> unk4; // 0x28
atomic_be_t<u64> vBlankCount; // 0x30 atomic_be_t<u64> vBlankCount; // 0x30
be_t<u32> unk; // 0x38 possible u32, 'flip field', top/bottom for interlaced be_t<u32> unk; // 0x38 possible u32, 'flip field', top/bottom for interlaced
be_t<u32> unk5; // 0x3C possible high bits of time stamp? used in getlastVBlankTime be_t<u32> lastVTimeHigh; // 0x3C last time for first vhandler freq (high 32-bits)
} head[8]; // size = 0x40, 0x200 } head[8]; // size = 0x40, 0x200
be_t<u32> unk7; // 0x12B8 be_t<u32> unk7; // 0x12B8