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

Vulkan: Submit main command buffer before acquiring the swapchain image #16061

Merged
merged 3 commits into from
Sep 20, 2022

Conversation

hrydgard
Copy link
Owner

Especially on Android, acquiring the swapchain image can take a little bit of time, and during that time we might as well have the work we've recorded so far submitted to the GPU. I meant to do this in a previous PR but had to pull it out due to issues. With my latest refactorings this was not so hard to get working.

Normally, though, the GPU and CPU won't be tightly synced enough for this to matter, but if my planned idea to minimize latency pans out, this might actually help somewhat.

Also fixes a bug where the screenshot command would be recorded on the wrong commandbuffer, causing it to possibly save an old frame. This was surfaced by submitting early.

@hrydgard hrydgard added this to the v1.14.0 milestone Sep 20, 2022
@unknownbrackets unknownbrackets merged commit cd2fc94 into master Sep 20, 2022
@unknownbrackets unknownbrackets deleted the vulkan-submit-main-before-acquire branch September 20, 2022 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants