Vulkan: fix CPU throttling frames to 2
Previously, the CPU was throttled to be at most N frames ahead, N being
the number of swapchain images. N is now fixed to 2, regardless of the
number of swapchain images. If N < 2, we would be stalling the CPU
unnecessarily, and if N > 2, the CPU could get too far ahead.
Effectively, here is how the throttling plays out with this commit:
Submit (Fence 1) + Present
Submit (Fence 2) + Present
Wait Fence 1
Submit (Fence 3) + Present
Wait Fence 2
Submit (Fence 4) + Present
Wait Fence 3
Submit (Fence 5) + Present
Wait Fence 4
...
Bug: angleproject:2942
Change-Id: I3b8c3bb88e52d62231306ec84aad50d2bf472d8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558681Reviewed-by:
Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Showing
Please
register
or
sign in
to comment