feat(agc): copy the GPU clock counter with COPY_DATA #1122
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1122"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-07T13:13:54Z.
What
COPY_DATArejected source select 9 (GPU clock count) and any cache-policy bits. PPSA16064 (Minecraft Dungeons II, Unreal Engine) calibrates its GPU timer at start-up with a submission of fiveCOPY_DATApackets, control0x06016209(GPU clock source, memory destination, 64-bit count, source and destination cache policy 3), so the submission was rejected.RELEASE_MEMtimestamp (the host steady clock in 10 ns ticks), read when the packet runs. This works through the direct execute path and throughResolveStorefor stores recorded on the GPU. A 32-bit count writes its low half.WRITE_DATAandDMA_DATA.Tested
ctest: 393/393.agc_driver_pm4: runs the title's packet twice and checks a nonzero, non-decreasing counter, an 8-byte resolved store, and that source select 10 is still rejected. Fails onmain.Asking for ideas
Sharing the
RELEASE_MEMclock keeps GPU timestamps self-consistent. If someone knows whether titles compare this counter against the CPU'ssceKernelGetProcessTimeCounter(and would need a common base), I'd like to hear it. TechnicalDebt records the choice.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T13:54:52Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL256Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T07:59:02Z.
Checked: build + full ctest on current
main(424/424),agc_driver_pm4fails without the change, the GPU clock formula is the same as theRELEASE_MEMtimestamp (Pm4.cpplines 540 and 819), and the cache policy mask matches the SRC/DST cache policy fields. The source select 10 (system clock) packet is still rejected.Added on top of your commit:
main(only theTechnicalDebt.mdadjacency with the 8_SRGB lines conflicted).COPY_DATAassertion inagc_driver_pm4: the low half is written and the upper half is left untouched, which the PR text claimed but no test pinned.Not verified here: that PPSA16064 only needs this counter (can't run the title), and whether titles compare it with
sceKernelGetProcessTimeCounter. Merging once CI is green.