Reuse present semaphores by acquired swapchain image #445
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!445
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/present-semaphores-per-image"
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?
What this fixes
With four swapchain images and three frames in flight, a visible window can reuse a presentation semaphore while the display still needs it. Validation reports
VUID-vkQueueSubmit2-semaphore-03868.Why merge
Change
gpu/vk/vk_internal.h: keep presentation semaphores beside swapchain images.gpu/vk/vk_main.cpp: allocate them per image and retire them with the existing swapchain.gpu/vk/vk_replay.cpp: select the acquired image's semaphore for submission and presentation.tests/test_present_semaphores.py: exercise the actual code with four images, three frame slots, recreation and setup failures.Tested
python -I -B tests/test_present_semaphores.py --cxx clang++checks reuse and cleanup without Vulkan. Fails on the old code, passes now.Not covered