Skip to content

Commit

Permalink
always wait for the gpu queue to complete to prevent screen tearing
Browse files Browse the repository at this point in the history
  • Loading branch information
xMeM committed Mar 31, 2024
1 parent e487fb9 commit 9277c26
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions wsi/x11/swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <stdexcept>

#include <dlfcn.h>
#include <fcntl.h>
#include <stdexcept>
#include <unistd.h>
#include <util/timed_semaphore.hpp>
#include <vulkan/vulkan_core.h>
Expand Down Expand Up @@ -492,12 +492,8 @@ VkResult swapchain::image_set_present_payload(swapchain_image &image, VkQueue qu

VkResult swapchain::image_wait_present(swapchain_image &image, uint64_t timeout)
{
if (sw_wsi)
{
auto data = reinterpret_cast<image_data *>(image.data);
return data->present_fence.wait_payload(timeout);
}
return VK_SUCCESS;
auto data = reinterpret_cast<image_data *>(image.data);
return data->present_fence.wait_payload(timeout);
}

VkResult swapchain::bind_swapchain_image(VkDevice &device, const VkBindImageMemoryInfo *bind_image_mem_info,
Expand Down

0 comments on commit 9277c26

Please sign in to comment.