Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the semaphore pool larger, such that there are enough for any number of swapchain images AND frames in flight. #3307

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

mcourteaux
Copy link
Contributor

@mcourteaux mcourteaux commented Jun 5, 2024

Constructed this together with @pezcode.

This very simple change fixes the issue on my device.

Summary:

  • my device made a swapchain of 2 images.
  • bgfx has by default a max frame latency of 3; so 3 frames in flight.
  • there is therefore missing one semaphore to have enough for the 3 frames in flight.

This fixes #3302 and replaces #3303.

…mber of swapchain images AND frames in flight.
@bkaradzic
Copy link
Owner

It doesn't look like fix. There should be association between semaphore that's queued and semaphore that's about to be used. And then before passing semaphore to vkAcquireNextImageKHR it should be waited for queue that would wait for this semaphore. This wait would be noop in most of cases since there is enough semaphores, but it would be proper synchronization for those cases where queue is not finished.

@bkaradzic bkaradzic merged commit 763732e into bkaradzic:master Jun 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vulkan] Synchronization issue: vkAcquireNextImage uses a semaphore which is in use.
2 participants