Fix the splash screen #1378
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1378
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1378/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Ekt0re on GitHub · 2026-10-10 17:48 UTC · original
Ekt0re:Fix-Splash-Screen→main· +12 −4 · 1 files · 1 commits · merged 2026-10-12 11:41 UTCFix the splash screen: wait for pending semaphore operations before
vkAcquireNextImageKHRFixes a Vulkan validation error / crash that occurs when the splash screen is shown, in every game, on
main.Related Issues: #1436
Affected games
The crash happens at the splash screen in every game launched on
main. It was reproduced and verified with:Problem
When the splash screen starts, the emulator aborts with this Vulkan error:
Example log
A second log (title
PPSA25646, build1cfb952) shows the identical error, so the problem is not tied to a single title.Test environment: Windows 11, NVIDIA GeForce RTX 4070 Ti.
Root cause
The swapchain keeps one
m_image_acquiredsemaphore per frame slot (m_frame_index). Each frame:AcquireNextImage()passesm_image_acquired[m_frame_index]tovkAcquireNextImageKHRas the semaphore to signal.Submit()makes the present command submission wait on that same semaphore.Nothing guaranteed that the previous submission which waited on
m_image_acquired[m_frame_index]had finished before the slot was reused. When the splash screen presents frames quickly, the semaphore can still have an uncompleted wait operation pending when it is passed tovkAcquireNextImageKHRagain. This violatesVUID-vkAcquireNextImageKHR-semaphore-01779.Fix
The swapchain now remembers the scheduler tick of the last submission made for each frame slot, and waits for that tick before the slot's semaphore is reused.
Changes in
src/graphics/presentation/window/swapchain.cppm_frame_ticks(std::vector<uint64_t>): one tick per frame slot.Swapchain::Create()(initialized to0).Swapchain::Destroy().Swapchain::Submit(): stores the tick returned byscheduler.Submit(submit)intom_frame_ticks[m_frame_index]before returning it.Swapchain::AcquireNextImage()now takes aCommandScheduler&. Before callingvkAcquireNextImageKHR, ifm_frame_ticks[m_frame_index] != 0, it callsscheduler.Wait(...)on that tick and resets it to0. This guarantees the semaphore has no pending operations when it is reused.Presenter::Impl::Present(): passespresent_schedulertoAcquireNextImage().Presenter::ClearLayer()(auto& layer) comes from the formatter and has no functional effect.Behavior and risk
Testing
Tested on Windows 11 with an NVIDIA RTX 4070 Ti. In all of the games listed above the splash screen is now shown correctly, with no
vkAcquireNextImageKHRerror and no crash.AI use
The implementation was developed with the aid of artificial intelligence (Claude Code) under my guidance, which assisted me in compiling the documentation for the work carried out. I carried out the tests myself and reviewed this description before submitting it.
@coderabbitai[bot] on GitHub · 2026-10-11 11:13 UTC · original · edited 2026-10-12 07:35 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
58a66969-2e4b-41ef-9abd-f949bc40b338📥 Commits
Reviewing files that changed from the base of the PR and between
16a7fe689aand f920a01e112cb4a2863e6d00cc963b8582f275a1.📒 Files selected for processing (1)
src/graphics/presentation/window/swapchain.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
Walkthrough
The swapchain now tracks a scheduler completion tick for each frame-in-flight slot. Before acquiring an image, it waits for the current slot’s prior tick when nonzero, then clears that tick. Submission records and returns the scheduler’s tick. Swapchain creation and destruction initialize and clear the tick array. Presentation passes its scheduler to image acquisition.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
f920aThe changed flow waits for the prior frame-slot submission before reusing its acquire semaphore. No merge-blocking risk is supported by the reviewed evidence.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.