Repository navigation
fix(videoout): cancel flips on a port the title closed instead of failing the driver - #1648
Conversation
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the full diff and built the exact PR head bed72585 locally in Release. The four registered Linux tests (video_out_flip_lifetime, reopen, decode, controls) pass 4/4; conventions pass as well. One required follow-up before merge: this head is 225 commits behind current main (merge base 4b005b22), and its declared prerequisite #1225 is still open. Please rebase the stack onto current main and rerun the exact-head checks, including Windows where these tests are registered. I will recheck the updated head then.
|
One additional Windows issue before the rebase: since #1367, SDL |
…read at Shutdown presentLoop called AgcDriverShutdown outside its try block, so a stored worker failure rethrown there terminated the process. Store it in flipQueue->failure so VideoOutDriver::Shutdown rethrows it after the join. Register the lifetime, decode and controls modes of video_out_flip_tests in ctest.
…Windows Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ram.json The offscreen SDL driver cannot create a Vulkan window on Windows since the VideoOut window uses SDL_WINDOW_VULKAN, so the tests that open a port now exit 77 (skipped) like the other display tests, unless ANYPS5_REQUIRE_DISPLAY is set. The tests also write app0/sce_sys/param.json, which AppMetadata now requires.
bed7258 to
c8a0622
Compare
|
Windows results with a real Vulkan window, since under ctest the port-opening modes skip on Windows (
So on an actual Windows desktop the fix does what it says, and the two modes it targets fail without it. Without a desktop session, the skip on Windows means CI only covers AI-assisted: yes |
|
One contribution-rule issue remains in the test registration inherited from #1225: all four |
…ling the driver A flip still queued or in presentation when the title closes its port is discarded, as on hardware, rather than stored as a driver failure. A closed port no longer terminates the presentation thread nor surfaces from Shutdown. The lifetime test now expects cancellation and the reopen mode is registered in ctest.
c8a0622 to
a1efdab
Compare
|
Thanks @MarcZX100. The four Durations on Linux with this head: |
|
Real-window timings from a Windows desktop, since they were still pending. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. This PR's head Each mode was run directly from the test's working directory with SDL's default video driver, 3 times:
All of them are far below the 30 s limit. Under ctest ( 🤖 Addressed by Claude Code |
|
Native Apple M2 validation confirms the shutdown behavior addressed by #1225 and the closed-port cancellation follow-up #1648. Environment: Apple M2 / 16 GB, macOS 27.2 beta 3, Apple Clang 21 / SDK 27, bundled SDL compiled from source, MoltenVK 1.4.2. The local integration already included ARM64/macOS branch
The existing An independent subagent reran pending-close, reopen, controls and presentation successfully, and reviewed error preservation and the macOS conflict resolution. No new production fix was authored. No games, full suite, or visible-output checks were performed; presentation results establish flip state and pacing, not pixel correctness. AI-assisted validation using Codex. |
|
Thanks @popcoder565 for the real-window timings on Windows (all under 1 s, far from the 30 s limit), @rmz-24 for the results on a real desktop, and @krishalivaibhav for the Apple M2 validation, which confirms the clean flip cancellation on a closed port. @MarcZX100 thanks for the review. The current head is |
|
Check: head |
|
Checked: build + scoped ctest on current main merged; Nit, not blocking: |
…-port-flip-cancel fix(videoout): cancel flips on a port the title closed instead of failing the driver
What
Follow-up to #1225 (split out because it widens that PR's scope). Part of #1040.
Closing a port while a flip is queued or being presented made
checkConfigthrowVideoOut: port is closedon the present thread, which terminated the process. That is the ps5-doom-timedemoexit reported on #1225 (I_Error→sceSystemServiceLoadExec("exit")).A flip on a port the title closed is now cancelled: its pending counters and buffer reuse ticket are released and no failure is stored, so the driver and
Shutdownstay clean. Real failures and process shutdown still propagate.RenderingWaitno longer throws on a closed port for the same reason.Closed()andCheckAlive()split the oldCheck(), which is unchanged for title-facing calls.testLifetimenow expects cancellation (no failure, no pending flip, no stale counters on the reopened port, clean shutdown), and thereopenmode is registered in ctest.Tested
Linux, SDL offscreen, lavapipe:
video_out_flip_lifetime,_reopen,_decode,_controlspass. Without thesrc/includechangelifetimefails andreopenaborts.tools/check_conventions.py --base upstream/mainpasses. Not tested on Windows or with ps5-doom itself.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository