If present ID is 0, we should consider it to be ignored.
Avoids a theoretical problem when using IMMEDIATE mode with present ID
where some images don't set present ID.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25178>
/* It is possible that an IDLE is observed before PRESENT_COMPLETE when
* not flipping. In this case, reading image->present_id might be a race
* in the FIFO management thread. */
- image->signal_present_id = image->present_id;
+ if (image->present_id)
+ image->signal_present_id = image->present_id;
}
static void x11_swapchain_notify_error(struct x11_swapchain *swapchain, VkResult result)