mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-08 14:58:06 +02:00
Fix that WSI layer display could end up with empty fd_set
Moved FD_ZERO() and FD_SET() inside the do...while loop so the fd_set is re-initialized before each select() call Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com> Change-Id: I63b9d472248ba4af150e1bcb235bf441c7e91c58
This commit is contained in:
parent
11e68db8ec
commit
65541a5557
1 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2024-2025 Arm Limited.
|
||||
* Copyright (c) 2024-2026 Arm Limited.
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
|
@ -359,11 +359,12 @@ void swapchain::present_image(const pending_present_request &pending_present)
|
|||
}
|
||||
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(display->get_drm_fd(), &fds);
|
||||
|
||||
do
|
||||
{
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(display->get_drm_fd(), &fds);
|
||||
|
||||
struct timeval t;
|
||||
t.tv_sec = 1;
|
||||
t.tv_usec = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue