test(videoout): correct first flip pacing assertion #7583

Merged
MarcZX10 merged 1 commit from upstream-pr/7583 into main 2026-10-18 16:22:52 +00:00
MarcZX10 commented 2026-10-18 15:46:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T15:46:27Z.


What

Remove the pacing test's requirement that three additional vblanks pass after the first flip completes. The configured interval is the minimum spacing between releases, so completion may occur in the same vblank as release. testPresentation() already checks the interval across consecutive flips. Keep the initial release-vblank sanity check and correct its failure message.

Tested

Linux: c++ -fsyntax-only passed for core/libs/prx/libSceVideoOut/tests/Flip.cpp. The focused executable could not be built or run in this container because this checkout's SDL2 submodule is uninitialized and the installed development environment lacks XRandR support. The reported Windows RTX 5070 Ti run was not available here.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #7581
  • Unblocks: none
  • GPUs tested: n/a (test-only change; no GPU test run)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4910486893 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7583). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T15:46:27Z. --- ### What Remove the pacing test's requirement that three additional vblanks pass after the first flip completes. The configured interval is the minimum spacing between releases, so completion may occur in the same vblank as release. `testPresentation()` already checks the interval across consecutive flips. Keep the initial release-vblank sanity check and correct its failure message. ### Tested Linux: `c++ -fsyntax-only` passed for `core/libs/prx/libSceVideoOut/tests/Flip.cpp`. The focused executable could not be built or run in this container because this checkout's SDL2 submodule is uninitialized and the installed development environment lacks XRandR support. The reported Windows RTX 5070 Ti run was not available here. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #7581 - [x] Unblocks: none - [x] GPUs tested: n/a (test-only change; no GPU test run) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 15:55:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T15:55:03Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libSceVideoOut/tests/Flip.cpp
PR 6044 core/libs/prx/libSceVideoOut/tests/Flip.cpp
PR 6977 core/libs/prx/libSceVideoOut/tests/Flip.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251954674 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7583#issuecomment-6251954674). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T15:55:03Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceVideoOut/tests/Flip.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceVideoOut/tests/Flip.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceVideoOut/tests/Flip.cpp` |
cadenasynyster commented 2026-10-18 16:00:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by cadenasynyster on 2026-10-18T16:00:50Z.


Ran this on the setup you couldn't, with a real window: Windows 11 26200, RTX 5070 Ti (NVIDIA 617.42), WinLibs GCC 15.2.0 r7, Release. Tree: main 9f25d0b with only this change to tests/Flip.cpp applied (this PR's base is newer than 9f25d0b, so I took the file alone to keep everything else equal).

video_out_flip_tests pacing, 3 runs each, directly with a real window:

tree result
main 9f25d0b fails 3 of 3 (the next flip is not paced from the vblank this flip was released at)
main 9f25d0b + this change passes 3 of 3

What it does and doesn't show: the change removes the vblankStatus.count >= lastFlipVblank + 3 half, which is the half that failed here, so a pass means the remaining lastFlipVblank >= 3 holds, not that the flip now takes a different path. On main, a local printf before the old check printed lastFlipVblank=11 vblank=11 in all 3 runs: the flip is released at vblank 11 and has completed by the time the test looks, so no vblank passes between release and completion. That fits your reading that the old check asked for an interval the code doesn't promise. I haven't found why the release is recorded as late as vblank 11 here; aftergpu, which uses the same busy loop, passes on main and shows the flip completing after the GPU work.

With the second half gone, pacing no longer checks that the first presentation outlasts its release. aftergpu covers the GPU-work ordering, and your second-flip idea would cover the release anchor.

Details are in #7581.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252012267 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7583#issuecomment-6252012267). Originally posted by [cadenasynyster](https://github.com/cadenasynyster) on 2026-10-18T16:00:50Z. --- Ran this on the setup you couldn't, with a real window: Windows 11 26200, RTX 5070 Ti (NVIDIA 617.42), WinLibs GCC 15.2.0 r7, Release. Tree: main 9f25d0b with only this change to `tests/Flip.cpp` applied (this PR's base is newer than 9f25d0b, so I took the file alone to keep everything else equal). `video_out_flip_tests pacing`, 3 runs each, directly with a real window: | tree | result | |---|---| | main 9f25d0b | fails 3 of 3 (`the next flip is not paced from the vblank this flip was released at`) | | main 9f25d0b + this change | passes 3 of 3 | What it does and doesn't show: the change removes the `vblankStatus.count >= lastFlipVblank + 3` half, which is the half that failed here, so a pass means the remaining `lastFlipVblank >= 3` holds, not that the flip now takes a different path. On main, a local `printf` before the old check printed `lastFlipVblank=11 vblank=11` in all 3 runs: the flip is released at vblank 11 and has completed by the time the test looks, so no vblank passes between release and completion. That fits your reading that the old check asked for an interval the code doesn't promise. I haven't found why the release is recorded as late as vblank 11 here; `aftergpu`, which uses the same busy loop, passes on main and shows the flip completing after the GPU work. With the second half gone, `pacing` no longer checks that the first presentation outlasts its release. `aftergpu` covers the GPU-work ordering, and your second-flip idea would cover the release anchor. Details are in #7581. AI-assisted: yes (Claude Code).
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
boykopovar/AnyPS5!7583
No description provided.