Skip to content

Commit

Permalink
Rely on Present wait in low latency mode if we have it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Oct 29, 2023
1 parent 7ef3061 commit 420fd45
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vulkan/wsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,12 @@ bool WSI::begin_frame()
Fence fence;

// TODO: Improve this with fancier approaches as needed.
if (low_latency_mode_enable)
if (low_latency_mode_enable &&
!device->get_device_features().present_wait_features.presentWait &&
current_present_mode == PresentMode::SyncToVBlank)
{
fence = device->request_legacy_fence();
}

auto acquire_ts = device->write_calibrated_timestamp();
result = table->vkAcquireNextImageKHR(context->get_device(), swapchain, UINT64_MAX, acquire->get_semaphore(),
Expand Down

0 comments on commit 420fd45

Please sign in to comment.