-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Vulkan backend: on synchronization primitives #1043
Conversation
Added a macro to switch between unlimited frame rate (VK_PRESENT_MODE_IMMEDIATE_KHR) and limited to 60 fps (VK_PRESENT_MODE_FIFO_KHR). Only the latter mode is guaranteed to be available, but the former one most likely is.
…g report callback Additional layer, extension and the callback itself are used/created when IMGUI_VULKAN_DEBUG_REPORT is defined. The callback reports seven (potential!) errors which will be fixed with another pull request.
…design changes are commented.
The transition of the swapchain image(s) can happen implicitly in the renderpass. This approach has been stated to be more efficient than using an explicit barrier. See "Vulkan Programming Guide", Chapter 7: "Graphics Pipelines", section "Renderpasses".
…bug report. This should be the last error.
…ribute. This is only meaningful when we present directly to multiple swapchains. In that case we can an VkResult per swapchain.
…submission through semaphores. To maintain maximum frame rate we render to the last acquired swapchain image but present the last but one drawn image. This behavior is optional through conditional compilation macros.
Added mandatory semaphores between vkQueueSubmit and vkQueuePresentKHR. To maintain a high frame rate in this single threaded scenario and efficiently overlap CPU and GPU work (still single threaded) we draw into the last acquired swapchain image but display the last but one. All changes made so far are editable, so that we can draw and immediately present the latest acquired image for the cost of less work overlap and hence much lower frame rate. However, the semaphores are required to ensure correctness. |
@ParticlePeter I am trying to catch up with the various Vulkan related PR but your PR here and most others have multiple commits that seems unrelated to that specific PR. Is that intended? |
Pasting comment from #1039, same author (now closed)
|
This is now merged (had to cherry-pick individual commits). Please in the future try to make the PR saner to work with :) Thanks! I also fixed an extra validation warning I got.
|
Hello and sorry for the generated work. I created in total three pull request. All the commits per pull request were meant to be accepted, I didn't mean you to cherry pick, what was the issue? |
With Git a PR is associated to a whole branch, so further commits in the branch gets added to the PR. So some of the commits here were duplicated 3 times. It's a classic confusing things with GIT, everyone makes the mistake once. I could probably have done without cherry-picking but it's also an easy way for me to "process" the changes one by one as I review them in situations where I am utterly confused by the sum of the whole. All good now (I think!). |
I am aware of the fact with the commits, but I have not found a good working procedure so far. Lets say PR2 branched from PR1, after that PR1 got some more commits which should be available in PR2 as well. So how to do that without hassle for you the origin maintainer? |
Make a branch for both (and to create the PRs from), and then have a "staging" branch that you merge both into for testing. Thats my usual flow. |
Sounds reasonable, thanks, I'll try that. |
See details in the commits