GPU: pace opening movie presents that skip a flip wait #2026

Closed
Chezzuss wants to merge 1 commit from upstream-pr/2028 into main
Chezzuss commented 2026-11-25 03:30:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Chezzuss on 2026-11-25T03:30:56Z.


Summary

The title's opening movie occasionally catches up by presenting a frame without first making its normal flip wait. In that case the host can present twice in one interval, giving adjacent movie frames uneven display times.

Once the title has completed a flip wait, each completed wait covers one present. A catch-up present reserves the next flip tick using the same clock lock as an explicit wait. The sleep happens after releasing the lock. Titles that have yet to complete an explicit flip wait retain their existing presentation behavior.

This ports GamingRipperDoc's fxceless #457 to the current upstream clock and its tick reservation from #174. #319 covers a different case where an explicit wait starts late.

Verification

The diagnostics executable builds on Windows. Both frame tests pass. Coverage includes a timed-out flip poll, a present after a completed wait, and two consecutive presents sharing one explicit wait.

The related integrated fxceless stack delivered a 33.35 ms median present interval in the sampled opening movie on RTX 3090. The standalone upstream port still needs its own in-title capture, so this PR is a draft.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6596545825 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2028). Originally posted by [Chezzuss](https://github.com/Chezzuss) on 2026-11-25T03:30:56Z. --- ## Summary The title's opening movie occasionally catches up by presenting a frame without first making its normal flip wait. In that case the host can present twice in one interval, giving adjacent movie frames uneven display times. Once the title has completed a flip wait, each completed wait covers one present. A catch-up present reserves the next flip tick using the same clock lock as an explicit wait. The sleep happens after releasing the lock. Titles that have yet to complete an explicit flip wait retain their existing presentation behavior. This ports GamingRipperDoc's [fxceless #457](https://github.com/fxceless/victory-fork/pull/457) to the current upstream clock and its tick reservation from [#174](https://github.com/Marvisak/VIctory/pull/174). [#319](https://github.com/Marvisak/VIctory/pull/319) covers a different case where an explicit wait starts late. ## Verification The diagnostics executable builds on Windows. Both frame tests pass. Coverage includes a timed-out flip poll, a present after a completed wait, and two consecutive presents sharing one explicit wait. The related integrated fxceless stack delivered a 33.35 ms median present interval in the sampled opening movie on RTX 3090. The standalone upstream port still needs its own in-title capture, so this PR is a draft. AI-assisted.
catminou4 commented 2026-11-25 04:06:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T03:33:16Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Opening-movie presents that skip a flip wait get paced — frame-pacing fix for the intro video path.

<!-- greyfinch-sync:Marvisak/VIctory:review:6051461816 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2028#pullrequestreview-6051461816). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T03:33:16Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Opening-movie presents that skip a flip wait get paced — frame-pacing fix for the intro video path.
jeremygold02 commented 2026-11-25 04:06:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T03:32:19Z.


Triage verdict — Draft pacing change; cover an interval change during a wait (e957cca)

Evidence

  • The port uses the tick reservation from merged #174 and addresses a present without a fresh wait. That is separate from #319’s late explicit wait.
  • set_interval replaces the clock and resets its flip state to Unused. If a flip wait reserved its tick before the interval change and wakes afterward, it sets whichever clock is current to Ready. The replacement clock can therefore inherit a present credit from a wait reserved on the old interval.

Checks and limits

  • This is a source-level interleaving. The reported tests cover timeout and successive presents on one interval. They do not exercise replacement of the clock while a flip wait sleeps. I did not rerun the tests or the movie capture.

Next step

  • Define whether an old wait may credit a new interval and add a controlled test for that sequence. If interval changes should reset pacing, tie the credit to the clock generation that reserved the tick. Keep the standalone pacing capture as a separate readiness check.

This verification was AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152007642 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2028#issuecomment-7152007642). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-25T03:32:19Z. --- **Triage verdict — Draft pacing change; cover an interval change during a wait** (`e957cca`) **Evidence** - The port uses the tick reservation from merged #174 and addresses a present without a fresh wait. That is separate from #319’s late explicit wait. - `set_interval` replaces the clock and resets its flip state to `Unused`. If a flip wait reserved its tick before the interval change and wakes afterward, it sets whichever clock is current to `Ready`. The replacement clock can therefore inherit a present credit from a wait reserved on the old interval. **Checks and limits** - This is a source-level interleaving. The reported tests cover timeout and successive presents on one interval. They do not exercise replacement of the clock while a flip wait sleeps. I did not rerun the tests or the movie capture. **Next step** - Define whether an old wait may credit a new interval and add a controlled test for that sequence. If interval changes should reset pacing, tie the credit to the clock generation that reserved the tick. Keep the standalone pacing capture as a separate readiness check. This verification was AI-assisted.
upstream-sync closed this pull request 2026-11-25 13:01:49 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2026
No description provided.