Repository navigation
Vulkan: "Acquire" the image from the swapchain as late as possible in the frame - #16035
Merged
Merged
Conversation
…y to the queue runner.
hrydgard
marked this pull request as ready for review
September 17, 2022 07:41
| case VKRStepType::RENDER: | ||
| PerformRenderPass(step, cmd); | ||
| if (!step.render.framebuffer) { | ||
| _dbg_assert_(!frameData.hasPresentCommands); |
Collaborator
There was a problem hiding this comment.
Hm, what about non-buffered? Is that always only a single render pass?
-[Unknown]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is good for CPU/GPU parallelism, although does open for even slightly more latency (though probably hardly noticeable). That point I plan to address with some automatic regulation of the queue length between the CPU and GPU later.
To do this, we've now split frame submission into three command buffers, from previous two:
init, main, present.
So we can now submit both init and main to the GPU before acquiring the image (which might take a short while on Android). In the meantime the GPU can do work. Also we now submit init before starting to encode the main command buffer.
Will test a bit on mobile before merge.Seems to work perfectly.