summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glx/dri3_glx.c11
-rw-r--r--src/glx/dri3_priv.h5
2 files changed, 11 insertions, 5 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 15d874d660f..b89cb463654 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -420,11 +420,14 @@ dri3_handle_present_event(struct dri3_drawable *priv, xcb_present_generic_event_
if (psc->show_fps_interval)
show_fps(priv, ce->ust);
+
+ priv->ust = ce->ust;
+ priv->msc = ce->msc;
} else {
priv->recv_msc_serial = ce->serial;
+ priv->notify_ust = ce->ust;
+ priv->notify_msc = ce->msc;
}
- priv->ust = ce->ust;
- priv->msc = ce->msc;
break;
}
case XCB_PRESENT_EVENT_IDLE_NOTIFY: {
@@ -498,8 +501,8 @@ dri3_wait_for_msc(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
}
}
- *ust = priv->ust;
- *msc = priv->msc;
+ *ust = priv->notify_ust;
+ *msc = priv->notify_msc;
*sbc = priv->recv_sbc;
return 1;
diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h
index 8e466407b89..160444907e6 100644
--- a/src/glx/dri3_priv.h
+++ b/src/glx/dri3_priv.h
@@ -182,9 +182,12 @@ struct dri3_drawable {
uint64_t send_sbc;
uint64_t recv_sbc;
- /* Last received UST/MSC values */
+ /* Last received UST/MSC values for pixmap present complete */
uint64_t ust, msc;
+ /* Last received UST/MSC values from present notify msc event */
+ uint64_t notify_ust, notify_msc;
+
/* Serial numbers for tracking wait_for_msc events */
uint32_t send_msc_serial;
uint32_t recv_msc_serial;