Repository navigation
Cancel suspended Vulkan presents before enqueueing (OLD-9805, carries #77) - #1829
potatoe0100 wants to merge 1 commit into
Conversation
Keep the deferred-present capacity check and enqueue under one lock. Return VK_NOT_READY when suspension aborts the wait, and report the suspended state for blank PresentX calls. Claim: https://github.com/ItsNotRexed/Leonida/issues/9677#issuecomment-7115108897 AI-assisted: OpenAI Codex.
MoonEyes
left a comment
There was a problem hiding this comment.
LGTM, with one note on coverage (not blocking).
Setup: Windows 11 Pro 26300, NVIDIA GeForce RTX 4060, driver 610.88, Vulkan SDK 1.4.363.0, MSVC 19.44.35230.0 (VS 2022), CMake 3.31.6 + Ninja, RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON. main = b9320a118. Only vk_presenter_sync_test was built and run (ctest -R "^vk_presenter_sync$"). Not run: the whole ctest set, any game boot.
Head 1ddae5136. This test opens a real Vulkan device (log line device: NVIDIA GeForce RTX 4060).
- PR head:
vk_presenter_syncPassed (1/1). main: Passed (1/1).- PR merged into
mainlocally (no conflict): Passed (1/1). - Mutant (PR test,
runtime/src/vulkan_present.handruntime/shims/xbox_present.cppofmain): Failed,line 427: interrupted == VK_NOT_READY, after the log line8 Presents are queued behind held work; this one waits for it. It is the first failing check and the test stops there (EXPECTreturns). With that one line neutralised locally,mainalso failsline 428: presenter.presented() == shown + capacity: the interrupted blank present returnedVK_SUCCESSand was queued as a ninth present, past the capacity of 8.
Note: the target does not compile runtime/shims/xbox_present.cpp, so the second half of the change (a failed blank PresentX reports the suspended state) is not exercised by this test, here or in the mutant. I did not run a test that covers it; the description's full ctest run is the only evidence for that part.
AI-assisted: yes (Claude Code built and ran the tests)
|
#1829 | head 1ddae51 (merged cleanly with main d48a957) | |
Claimed in the coordination issue as: OLD-9805 (#1608 (comment))
What and why
Carries forward
old-pr/9805(draft #77) by @a-lebailly, rebased onmain0d80bc5dfwith the author's commit. The deferred-present capacity check and the enqueue now happen under one lock, a wait aborted by suspension returnsVK_NOT_READY, and a blankPresentXreports the suspended state instead of the raw failure.Rebase notes:
runtime/shims/xbox_present.cppconflicted withmain'spresent_diag()wrapper on the blank-present path. Kept the author's suspended-state check and wrapped both returns inpresent_diag(__LINE__, ...)asmaindoes.Supersedes draft #77 (its branch can be deleted once this lands).
Tested
VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja, Vulkan SDK 1.4.363.0.
vk_presenter_syncpasses.ctest -j 6: 439 of 439 passed.GPUs tested: NVIDIA GeForce RTX 4060, driver 621.14, Windows 11 Pro 26H2 (build 26300)
AI-assisted: yes (the original commit says OpenAI Codex; the rebase and testing used Claude Code), by a non-developer tester.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code