Lockstep title clock: design exists, no implementation and two open decisions #254

Open
opened 2026-12-02 17:11:59 +00:00 by github-bot · 0 comments
Owner

@⁠TheRifai on GitHub · 2026-12-02 16:29 UTC · original

Finding (TASKS "Lockstep title clock", line 1003)

Seen on: main 9d4e2f1 (repo inventory). The design is written up in docs/learnings/picture-gate.md section A (~15 time-import wrappers, VICTORY_CLOCK=lockstep, shots keyed by title frame), but no victory_gpu::vclock module or VICTORY_CLOCK toggle exists in the tree: grep -rn 'vclock|VICTORY_CLOCK' crates greenfield returns nothing. Today the title clock comes from Wine's QPC at several sites (PE watcher vklive.rs:100-110, D3D12 queue.rs:833-887, GameInput gameinput.rs:379-383) and the key script is wall-clock (VICTORY_KEYS_FILE, 100 ms polling).

I did not implement the smallest slice (the clock module + one import wrapper): it would be inert without the frame-event clock offset and the frame-keyed shot request, and the design leaves one open question that changes the approach — whether the title's game time comes from RDTSC and must be trapped, plus whether the GPU clock must become synthetic. Those need a decision and a console reference, not a guess. No code change from me.

Next

Decide the scope (one wrapper as a spike vs the full clock), then land the module with the import hook and the frame-event offset together; the picture gate and key script need to consume the frame-based interface before it gives repeatable shots.

**@⁠TheRifai** on GitHub · 2026-12-02 16:29 UTC · [original](https://github.com/vktory6/VKtory/issues/254) ## Finding (TASKS "Lockstep title clock", line 1003) **Seen on:** main `9d4e2f1` (repo inventory). The design is written up in `docs/learnings/picture-gate.md` section A (~15 time-import wrappers, `VICTORY_CLOCK=lockstep`, shots keyed by title frame), but no `victory_gpu::vclock` module or `VICTORY_CLOCK` toggle exists in the tree: `grep -rn 'vclock|VICTORY_CLOCK' crates greenfield` returns nothing. Today the title clock comes from Wine's QPC at several sites (PE watcher `vklive.rs:100-110`, D3D12 `queue.rs:833-887`, GameInput `gameinput.rs:379-383`) and the key script is wall-clock (`VICTORY_KEYS_FILE`, 100 ms polling). I did not implement the smallest slice (the clock module + one import wrapper): it would be inert without the frame-event clock offset and the frame-keyed shot request, and the design leaves one open question that changes the approach — whether the title's game time comes from RDTSC and must be trapped, plus whether the GPU clock must become synthetic. Those need a decision and a console reference, not a guess. No code change from me. ## Next Decide the scope (one wrapper as a spike vs the full clock), then land the module with the import hook and the frame-event offset together; the picture gate and key script need to consume the frame-based interface before it gives repeatable shots.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 17:12:00 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/vktory6--VKtory#254
No description provided.