If we observe IDLE before COMPLETE, another queued image may have
presented with present ID 0 which would break the check fixed in this
commit. The original fix for present_id / signal_present_id split
forgot to take this into account.
Fixes:
32f7ff2c204b ("Fix present ID signal when IDLE comes before
COMPLETE").
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>
static void x11_present_complete(struct x11_swapchain *swapchain,
struct x11_image *image)
{
- if (image->present_id) {
+ if (image->signal_present_id) {
pthread_mutex_lock(&swapchain->present_progress_mutex);
if (image->signal_present_id > swapchain->present_id) {
swapchain->present_id = image->signal_present_id;