mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 21:18:15 +02:00
clients: Fix dmabuf feedback stall in simple-vulkan
When we receive dmabuf feedback, we hit the VK_SUBOPTIMAL path and recreate the swapchain, returning early without submitting work. However, we've already reset the fence before we do this, so we'll block forever waiting for work that never comes to signal it. Instead, we should reset the fence right before we know we're submitting work. Fixes:75c37afa("clients/simple-vulkan: New Vulkan client example") Signed-off-by: Derek Foreman <derek.foreman@collabora.com> (cherry picked from commitaf736168f7)
This commit is contained in:
parent
f0fa8b9b18
commit
71191cd127
1 changed files with 2 additions and 1 deletions
|
|
@ -1564,7 +1564,6 @@ redraw(struct window *window)
|
|||
|
||||
assert(window->vk.frame_index < ARRAY_LENGTH(window->vk.frames));
|
||||
vkWaitForFences(window->vk.dev, 1, &frame->fence, VK_TRUE, UINT64_MAX);
|
||||
vkResetFences(window->vk.dev, 1, &frame->fence);
|
||||
|
||||
uint32_t image_index;
|
||||
result = vkAcquireNextImageKHR(window->vk.dev, window->vk.swapchain, UINT64_MAX,
|
||||
|
|
@ -1575,6 +1574,8 @@ redraw(struct window *window)
|
|||
}
|
||||
assert(result == VK_SUCCESS);
|
||||
|
||||
vkResetFences(window->vk.dev, 1, &frame->fence);
|
||||
|
||||
assert(image_index < ARRAY_LENGTH(window->vk.images));
|
||||
|
||||
struct window_image *image = &window->vk.images[image_index];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue