vkd3d-proton/libs
Joshua Ashton e1f792e714 vkd3d: Low latency presentation and acquire semaphores
In cases where acquire image is blocking, we should call that after
presentation to avoid latency when the app calls present.

This avoids weird inverse frame cadences with Mesa WSI right now,
as acquiring an image is always a blocking call until it is complete.

In cases when we aren't blocking, this kicks off the acquisition so
it can be waited upon by the next present blit pass.

Use another set of semaphores to wait for the image acquisition on the
GPU.

In the non-blocking vkAcquireNextImageKHR case, this means that a
potential bubble of time between waiting on the fence and submitting
the blit + presentation is eliminated.

Runaway presentation in this setup is avoided by frame latency objects
and normal frame latency which is always 3 according to documentation.

Be careful about handling SUBOPTIMAL. Semaphores will be signaled, but
we might want to tear down the swapchain. In these cases, we need to
wait for the semaphore to be signaled first, which can only be done by
submitting a wait, since QueueWaitIdle or DeviceWaitIdle don't cover
WSI.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-02 14:40:16 +02:00
..
d3d12 d3d12: Initialize optional extensions 2021-04-21 00:48:43 +02:00
vkd3d vkd3d: Low latency presentation and acquire semaphores 2021-06-02 14:40:16 +02:00
vkd3d-common vkd3d-shader: Dump RT export SPIR-V. 2021-03-12 12:20:10 +01:00
vkd3d-shader vkd3d-shader: Don't apply offset buffers for non-bindless resources. 2021-05-27 23:30:51 +02:00
vkd3d-utils vkd3d-utils: Fix .def version. 2021-04-22 15:30:58 +01:00
.gitignore libs/vkd3d: Trace build version. 2018-06-27 22:43:49 +02:00
meson.build meta: Add missing newlines to end of files 2020-11-05 17:16:57 +01:00